-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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 8 pull requests #83855
Rollup of 8 pull requests #83855
Commits on Feb 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for af424c1 - Browse repository at this point
Copy the full SHA af424c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 524b0c9 - Browse repository at this point
Copy the full SHA 524b0c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6c8f3b - Browse repository at this point
Copy the full SHA c6c8f3bView commit details
Commits on Feb 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2fb56cc - Browse repository at this point
Copy the full SHA 2fb56ccView commit details
Commits on Mar 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for e7f340e - Browse repository at this point
Copy the full SHA e7f340eView commit details
Commits on Mar 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for aef1e35 - Browse repository at this point
Copy the full SHA aef1e35View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f2ca47 - Browse repository at this point
Copy the full SHA 3f2ca47View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d52006 - Browse repository at this point
Copy the full SHA 2d52006View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13371b5 - Browse repository at this point
Copy the full SHA 13371b5View commit details -
Emit the lint level of the unused-crate-dependencies
Also, turn off the lint when the unused dependencies json flag is specified so that cargo doesn't have to supress the lint
Configuration menu - View commit details
-
Copy full SHA for 3a62eb7 - Browse repository at this point
Copy the full SHA 3a62eb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8c9a28 - Browse repository at this point
Copy the full SHA d8c9a28View commit details -
Configuration menu - View commit details
-
Copy full SHA for d018ef1 - Browse repository at this point
Copy the full SHA d018ef1View commit details
Commits on Mar 26, 2021
-
Recent FreeBSD gdb packages have a different format for the version string.
Configuration menu - View commit details
-
Copy full SHA for 4f73d21 - Browse repository at this point
Copy the full SHA 4f73d21View commit details
Commits on Apr 2, 2021
-
rustdoc: highlight macros more efficiently
Instead of producing `<span class=macro>assert_eq</span><span class=macro>!</span>`, just produce `<span class=macro>assert_eq!</span>`.
Configuration menu - View commit details
-
Copy full SHA for 617e135 - Browse repository at this point
Copy the full SHA 617e135View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2fb1fb7 - Browse repository at this point
Copy the full SHA 2fb1fb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a97eee - Browse repository at this point
Copy the full SHA 0a97eeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for c29dc12 - Browse repository at this point
Copy the full SHA c29dc12View commit details
Commits on Apr 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for f64038f - Browse repository at this point
Copy the full SHA f64038fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 13e482b - Browse repository at this point
Copy the full SHA 13e482bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3bd241f - Browse repository at this point
Copy the full SHA 3bd241fView commit details -
Co-authored-by: Ralf Jung <post@ralfj.de>
Configuration menu - View commit details
-
Copy full SHA for 572873f - Browse repository at this point
Copy the full SHA 572873fView commit details
Commits on Apr 4, 2021
-
Rollup merge of rust-lang#73945 - est31:unused_externs, r=Mark-Simula…
…crum Add an unstable --json=unused-externs flag to print unused externs This adds an unstable flag to print a list of the extern names not used by cargo. This PR will enable cargo to collect unused dependencies from all units and provide warnings. The companion PR to cargo is: rust-lang/cargo#8437 The goal is eventual stabilization of this flag in rustc as well as in cargo. Discussion of this feature is mostly contained inside these threads: rust-lang#57274 rust-lang#72342 rust-lang#72603 The feature builds upon the internal datastructures added by rust-lang#72342 Externs are uniquely identified by name and the information is sufficient for cargo. If the mode is enabled, rustc will print json messages like: ``` {"unused_extern_names":["byteorder","openssl","webpki"]} ``` For a crate that got passed byteorder, openssl and webpki dependencies but needed none of them. ### Q: Why not pass -Wunused-crate-dependencies? A: See [ehuss's comment here](rust-lang#57274 (comment)) TLDR: it's cleaner. Rust's warning system wasn't built to be filtered or edited by cargo. Even a basic implementation of the feature would have to change the "n warnings emitted" line that rustc prints at the end. Cargo ideally wants to synthesize its own warnings anyways. For example, it would be hard for rustc to emit warnings like "dependency foo is only used by dev targets", suggesting to make it a dev-dependency instead. ### Q: Make rustc emit used or unused externs? A: Emitting used externs has the advantage that it simplifies cargo's collection job. However, emitting unused externs creates less data to be communicated between rustc and cargo. Often you want to paste a cargo command obtained from `cargo build -vv` for doing something completely unrelated. The message is emitted always, even if no warning or error is emitted. At that point, even this tiny difference in "noise" matters. That's why I went with emitting unused externs. ### Q: One json msg per extern or a collective json msg? A: Same as above, the data format should be concise. Having 30 lines for the 30 crates a crate uses would be disturbing to readers. Also it helps the cargo implementation to know that there aren't more unused deps coming. ### Q: Why use names of externs instead of e.g. paths? A: Names are both sufficient as well as neccessary to uniquely identify a passed `--extern` arg. Names are sufficient because you *must* pass a name when passing an `--extern` arg. Passing a path is optional on the other hand so rustc might also figure out a crate's location from the file system. You can also put multiple paths for the same extern name, via e.g. `--extern hello=/usr/lib/hello.rmeta --extern hello=/usr/local/lib/hello.rmeta`, but rustc will only ever use one of those paths. Also, paths don't identify a dependency uniquely as it is possible to have multiple different extern names point to the same path. So paths are ill-suited for identification. ### Q: What about 2015 edition crates? A: They are fully supported. Even on the 2015 edition, an explicit `--extern` flag is is required to enable `extern crate foo;` to work (outside of sysroot crates, which this flag doesn't warn about anyways). So the lint would still fire on 2015 edition crates if you haven't included a dependency specified in Cargo.toml using `extern crate foo;` or similar. The lint won't fire if your sole use in the crate is through a `extern crate foo;` statement, but that's not its job. For detecting unused `extern crate foo` statements, there is the `unused_extern_crates` lint which can be enabled by `#![warn(unused_extern_crates)]` or similar. cc ```@jsgf``` ```@ehuss``` ```@petrochenkov``` ```@estebank```
Configuration menu - View commit details
-
Copy full SHA for a1c3449 - Browse repository at this point
Copy the full SHA a1c3449View commit details -
Rollup merge of rust-lang#81619 - SkiFire13:resultshunt-inplace, r=th…
…e8472 Implement `SourceIterator` and `InPlaceIterable` for `ResultShunt`
Configuration menu - View commit details
-
Copy full SHA for 869726d - Browse repository at this point
Copy the full SHA 869726dView commit details -
Rollup merge of rust-lang#82726 - ssomers:btree_node_rearange, r=Mark…
…-Simulacrum BTree: move blocks around in node.rs Without changing any names or implementation, reorder some members: - Move down the ones defined long ago on the demised `struct Root`, to below the definition of their current host `struct NodeRef`. - Move up some defined on `struct NodeRef` that are interspersed with those defined on `struct Handle`. - Move up the `correct_…` methods squeezed between the two flavours of `push`. - Move the unchecked static downcasts (`cast_to_…`) after the upcasts (`forget_`) and the (weirdly named) dynamic downcasts (`force`). r? ````@Mark-Simulacrum````
Configuration menu - View commit details
-
Copy full SHA for 6c13556 - Browse repository at this point
Copy the full SHA 6c13556View commit details -
Rollup merge of rust-lang#83521 - sexxi-goose:quick-diagnostic-fix, r…
…=nikomatsakis 2229: Fix diagnostic issue when using FakeReads in closures This PR fixes a diagnostic issue caused by rust-lang#82536. A temporary work around was used in this merged PR which involved feature gating the addition of FakeReads introduced as a result of pattern matching in closures. The fix involves adding an optional closure DefId to ForLet and ForMatchedPlace FakeReadCauses. This DefId will only be added if a closure pattern matches a Place starting with an Upvar. r? ```@nikomatsakis```
Configuration menu - View commit details
-
Copy full SHA for a89eab9 - Browse repository at this point
Copy the full SHA a89eab9View commit details -
Rollup merge of rust-lang#83532 - asomers:gdb-fbsd, r=Mark-Simulacrum
Fix compiletest on FreeBSD Recent FreeBSD gdb packages have a different format for the version string.
Configuration menu - View commit details
-
Copy full SHA for 3cbed89 - Browse repository at this point
Copy the full SHA 3cbed89View commit details -
Rollup merge of rust-lang#83793 - notriddle:single-span-macro-highlig…
…ht, r=GuillaumeGomez rustdoc: highlight macros more efficiently Instead of producing `<span class=macro>assert_eq</span><span class=macro>!</span>`, just produce `<span class=macro>assert_eq!</span>`.
Configuration menu - View commit details
-
Copy full SHA for 25026c9 - Browse repository at this point
Copy the full SHA 25026c9View commit details -
Rollup merge of rust-lang#83809 - GuillaumeGomez:remove-initial-ids, …
…r=camelid Remove unneeded INITIAL_IDS const Some IDs inside this map didn't exist anymore, some others were duplicates of what we have inside `IdMap`. So instead of keeping the two around and since `INITIAL_IDS` was only used by `IdMap`, no need to keep both of them.
Configuration menu - View commit details
-
Copy full SHA for e62fce3 - Browse repository at this point
Copy the full SHA e62fce3View commit details -
Rollup merge of rust-lang#83827 - the8472:fix-inplace-panic-on-drop, …
…r=RalfJung cleanup leak after test to make miri happy Contains changes that were requested in rust-lang#83629 but didn't make it into the rollup. r? `````@RalfJung`````
Configuration menu - View commit details
-
Copy full SHA for b943ea8 - Browse repository at this point
Copy the full SHA b943ea8View commit details