Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #47644

Merged
merged 24 commits into from
Jan 22, 2018
Merged

Rollup of 9 pull requests #47644

merged 24 commits into from
Jan 22, 2018

Conversation

estebank and others added 24 commits January 14, 2018 22:46
 - Use `syntax::util::parser::expr_precedence` to determine wether
   parenthesis are needed around the casting target.
 - Update message to not incorrectly mention rounding on `.into()`
   suggestions, as those types that do have that implemented will never
   round.
Introduce a new unified type that holds the expression precedence for
both AST and HIR nodes.
To workaround a bug in glibc <= 2.26 lookup_host() calls res_init()
based on the glibc version detected at runtime. While this avoids
calling res_init() on platforms where it's not required we will still
end up linking against the symbol.

This causes an issue on macOS where res_init() is implemented in a
separate library (libresolv.9.dylib) from the main libc. While this is
harmless for standalone programs it becomes a problem if Rust code is
statically linked against another program. If the linked program doesn't
already specify -lresolv it will cause the link to fail. This is
captured in issue rust-lang#46797

Fix this by hooking in to the glibc workaround in `cvt_gai` and only
activating it for the "gnu" environment on Unix This should include all
glibc platforms while excluding musl, windows-gnu, macOS, FreeBSD, etc.

This has the side benefit of removing the #[cfg] in sys_common; only
unix.rs has code related to the workaround now.
This is a forward-port of:

* 9426dda
* cbfb985

from the beta branch which is used to automatically calculate the beta number
based on the number of merges to the beta branch so far.
…nix, r=alexcrichton

Only link res_init() on GNU/*nix

To workaround a bug in glibc <= 2.26 lookup_host() calls res_init() based on the glibc version detected at runtime. While this avoids calling res_init() on platforms where it's not required we will still end up linking against the symbol.

This causes an issue on macOS where res_init() is implemented in a separate library (libresolv.9.dylib) from the main libc. While this is harmless for standalone programs it becomes a problem if Rust code is statically linked against another program. If the linked program doesn't already specify -lresolv it will cause the link to fail. This is captured in issue rust-lang#46797

Fix this by hooking in to the glibc workaround in `cvt_gai` and only activating it for the "gnu" environment on Unix This should include all glibc platforms while excluding musl, windows-gnu, macOS, FreeBSD, etc.

This has the side benefit of removing the #[cfg] in sys_common; only unix.rs has code related to the workaround now.

Before this commit:
```shell
> cat main.rs
use std::net::ToSocketAddrs;

#[no_mangle]
pub extern "C" fn resolve_test() -> () {
    let addr_list = ("google.com.au", 0).to_socket_addrs().unwrap();
    println!("{:?}", addr_list);
}
> rustc --crate-type=staticlib main.rs
> clang libmain.a test.c -o combined
Undefined symbols for architecture x86_64:
  "_res_9_init", referenced from:
      std::net::lookup_host::h93c17fe9ad38464a in libmain.a(std-826c8d3b356e180c.std0.rcgu.o)
ld: symbol(s) not found for architecture x86_64
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
```

Afterwards:
```shell
> rustc --crate-type=staticlib main.rs
> clang libmain.a test.c -o combined
> ./combined
IntoIter([V4(172.217.25.131:0)])
```

Fixes  rust-lang#46797
Add E0659 for ambiguous names

Still on the tracks of the "no error without error code" road.
Automaticaly calculate beta prerelease numbers

This is a forward-port of:

* 9426dda
* cbfb985

from the beta branch which is used to automatically calculate the beta number
based on the number of merges to the beta branch so far.
Small improvements to the documentation of VecDeque.

Some small improvements to the documentation of `VecDeque`.
fix doctests for BTreeSet to use BTreeSet (not BTreeMap)

This fixes rust-lang#47624
…nks, r=kennytm

Fix broken links to other slice functions in chunks/chunks_mut/exact_…

…chunk/exact_chunks_mut docs

See rust-lang#47126 (comment)
…klabnik

Fix mailmap duplicates, Carol and Brian.

This fix corrects the .mailmap file so that Carol (Nichols || Goulding) appears only once, and Brian Anderson also appears only once.
@rust-highfive
Copy link
Collaborator

r? @estebank

(rust_highfive has picked a reviewer for you, use r? to override)

@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=1

@bors
Copy link
Contributor

bors commented Jan 21, 2018

📌 Commit dcbf0bf has been approved by GuillaumeGomez

@bors
Copy link
Contributor

bors commented Jan 21, 2018

⌛ Testing commit dcbf0bf with merge ff2a7c8...

bors added a commit that referenced this pull request Jan 21, 2018
Rollup of 9 pull requests

- Successful merges: #47247, #47334, #47512, #47582, #47595, #47625, #47632, #47633, #47637
- Failed merges:
@bors
Copy link
Contributor

bors commented Jan 22, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: GuillaumeGomez
Pushing ff2a7c8 to master...

@bors bors merged commit dcbf0bf into rust-lang:master Jan 22, 2018
@GuillaumeGomez GuillaumeGomez deleted the rollup branch January 22, 2018 08:49
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants