-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 7 pull requests #65854
Rollup of 7 pull requests #65854
Commits on Oct 22, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 58c6591 - Browse repository at this point
Copy the full SHA 58c6591View commit details -
Configuration menu - View commit details
-
Copy full SHA for 88e4e2a - Browse repository at this point
Copy the full SHA 88e4e2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b58095 - Browse repository at this point
Copy the full SHA 5b58095View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0118278 - Browse repository at this point
Copy the full SHA 0118278View commit details -
Configuration menu - View commit details
-
Copy full SHA for 669a403 - Browse repository at this point
Copy the full SHA 669a403View commit details -
Configuration menu - View commit details
-
Copy full SHA for 580a93e - Browse repository at this point
Copy the full SHA 580a93eView commit details
Commits on Oct 23, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 3a4cacd - Browse repository at this point
Copy the full SHA 3a4cacdView commit details
Commits on Oct 24, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 93cac9c - Browse repository at this point
Copy the full SHA 93cac9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ca8da4 - Browse repository at this point
Copy the full SHA 1ca8da4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7073158 - Browse repository at this point
Copy the full SHA 7073158View commit details
Commits on Oct 25, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 949874a - Browse repository at this point
Copy the full SHA 949874aView commit details -
Configuration menu - View commit details
-
Copy full SHA for fa637fa - Browse repository at this point
Copy the full SHA fa637faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1033298 - Browse repository at this point
Copy the full SHA 1033298View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb440f0 - Browse repository at this point
Copy the full SHA cb440f0View commit details -
Apply suggestions from code review
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0c05ed2 - Browse repository at this point
Copy the full SHA 0c05ed2View commit details -
Renamed ui/dead-code-ret to ui/unreachable-code-ret
This test was actually about the unreachable_code flag, not dead_code, so I renamed it for clarity (to prepare for the next commit, where I plan to move a bunch of the dead_code tests to a single folder)
Configuration menu - View commit details
-
Copy full SHA for 9f257dd - Browse repository at this point
Copy the full SHA 9f257ddView commit details -
Move dead_code related tests to test/ui/dead-code
This helps organize the tests better. I also renamed several of the tests to remove redundant dead-code in the path, and better match what they're testing
Configuration menu - View commit details
-
Copy full SHA for cb5fd4e - Browse repository at this point
Copy the full SHA cb5fd4eView commit details -
Remove lint callback from driver
This is leftover from a restructuring of lint registration for drivers; it should now happen via the register_lints field on Config rather than this function.
Configuration menu - View commit details
-
Copy full SHA for 402a8af - Browse repository at this point
Copy the full SHA 402a8afView commit details
Commits on Oct 26, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 8f988bd - Browse repository at this point
Copy the full SHA 8f988bdView commit details -
Move crate type checking later
This allows us to directly pass in a lint buffer
Configuration menu - View commit details
-
Copy full SHA for 2ac9b7a - Browse repository at this point
Copy the full SHA 2ac9b7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a44126a - Browse repository at this point
Copy the full SHA a44126aView commit details -
Use ident instead of def_span in dead-code pass
According to @estebank, def_span scans forward on the line until it finds a {, and if it can't find one, fallse back to the span for the whole item. This was apparently written before the identifier span was explicitly tracked on each node. This means that if an unused function signature spans multiple lines, the entire function (potentially hundreds of lines) gets flagged as dead code. This could, for example, cause IDEs to add error squiggly's to the whole function. By using the span from the ident instead, we narrow the scope of this in most cases. In a wider sense, it's probably safe to use ident.span instead of def_span in most locations throughout the whole code base, but since this is my first contribution, I kept it small. Some interesting points that came up while I was working on this: - I reorganized the tests a bit to bring some of the dead code ones all into the same location - A few tests were for things unrelated to dead code (like the path-lookahead for parens), so I added #![allow(dead_code)] and cleaned up the stderr file to reduce noise in the future - The same fix doesn't apply to const and static declarations. I tried adding these cases to the match expression, but that created a much wider change to tests and error messages, so I left it off until I could get some code review to validate the approach.
Configuration menu - View commit details
-
Copy full SHA for 94890d2 - Browse repository at this point
Copy the full SHA 94890d2View commit details -
Rollup merge of rust-lang#65288 - estebank:point-at-assoc-type, r=nik…
…omatsakis Point at associated type for some obligations Partially address rust-lang#57663.
Configuration menu - View commit details
-
Copy full SHA for 677cbd0 - Browse repository at this point
Copy the full SHA 677cbd0View commit details -
Rollup merge of rust-lang#65541 - eddyb:spanned-inferred-outlives, r=…
…nikomatsakis rustc: add `Span`s to `inferred_outlives_of` predicates. This would simplify rust-lang#59789, and I suspect it has some potential in diagnostics (although we don't seem to use the predicate `Span`s much atm).
Configuration menu - View commit details
-
Copy full SHA for a6c9ebd - Browse repository at this point
Copy the full SHA a6c9ebdView commit details -
Rollup merge of rust-lang#65738 - ohadravid:re-rebalance-coherence-al…
…low-fundamental-local, r=nikomatsakis Coherence should allow fundamental types to impl traits when they are local After rust-lang#64414, `impl<T> Remote for Box<T> { }` is disallowed, but it is also disallowed in liballoc, where `Box` is a local type! Enabling `#![feature(re_rebalance_coherence)]` in `liballoc` results in: ``` error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct<F>`) --> src\liballoc\boxed.rs:1098:1 | 1098 | impl<F: ?Sized + Future + Unpin> Future for Box<F> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `F` must be used as the type parameter for some local type ``` This PR relaxes `uncover_fundamental_ty` to skip local fundamental types. I didn't add a test since `liballoc` already fails to compile, but I can add one if needed. r? @nikomatsakis cc rust-lang#63599
Configuration menu - View commit details
-
Copy full SHA for 823a3f2 - Browse repository at this point
Copy the full SHA 823a3f2View commit details -
Rollup merge of rust-lang#65777 - matthewjasper:allow-impl-trait-expa…
…nsion, r=davidtwco Don't ICE for completely unexpandable `impl Trait` types Save the resolution of these types (to themselves) to the typeck tables so that they will eventually reach E0720. closes rust-lang#65561
Configuration menu - View commit details
-
Copy full SHA for 8a5f08f - Browse repository at this point
Copy the full SHA 8a5f08fView commit details -
Rollup merge of rust-lang#65830 - Quantumplation:master, r=davidtwco
Use ident.span instead of def_span in dead-code pass Hello! First time contributor! :) This should fix rust-lang#58729. According to @estebank in the duplicate rust-lang#63064, def_span scans forward on the line until it finds a {, and if it can't find one, falls back to the span for the whole item. This was apparently written before the identifier span was explicitly tracked on each node. This means that if an unused function signature spans multiple lines, the entire function (potentially hundreds of lines) gets flagged as dead code. This could, for example, cause IDEs to add error squiggly's to the whole function. By using the span from the ident instead, we narrow the scope of this in most cases. In a wider sense, it's probably safe to use ident.span instead of def_span in most locations throughout the whole code base, but since this is my first contribution, I kept it small. Some interesting points that came up while I was working on this: - I reorganized the tests a bit to bring some of the dead code ones all into the same location - A few tests were for things unrelated to dead code (like the path-lookahead for parens), so I added #![allow(dead_code)] and cleaned up the stderr file to reduce noise in the future - The same fix doesn't apply to const and static declarations. I tried adding these cases to the match expression, but that created a much wider change to tests and error messages, so I left it off until I could get some code review to validate the approach.
Configuration menu - View commit details
-
Copy full SHA for 838ed89 - Browse repository at this point
Copy the full SHA 838ed89View commit details -
Rollup merge of rust-lang#65834 - Mark-Simulacrum:driver-clean, r=nik…
…omatsakis Remove lint callback from driver This is leftover from a restructuring of lint registration for drivers; it should now happen via the register_lints field on Config rather than this function. This is not used by anyone to my knowledge (including the compiler itself); it was introduced in an abandoned refactor in rust-lang#65193.
Configuration menu - View commit details
-
Copy full SHA for 8ce925a - Browse repository at this point
Copy the full SHA 8ce925aView commit details -
Rollup merge of rust-lang#65835 - Mark-Simulacrum:lockless-lintbuffer…
…, r=nikomatsakis Remove LintBuffer from Session This moves the `LintBuffer` from `Session` into the `Resolver`, where it is used until lowering is done and then consumed by early lint passes. This also happily removes the failure mode of buffering lints too late where it would have previously lead to ICEs; it is statically no longer possible to do so. I suspect that with a bit more work a similar move could be done for the lint buffer inside `ParseSess`, but this PR doesn't touch it (in part to keep itself small). The last commit is the "interesting" commit -- the ones before it don't work (though they compile) as they sort of prepare the various crates for the lint buffer to be passed in rather than accessed through Session.
Configuration menu - View commit details
-
Copy full SHA for ee82c8c - Browse repository at this point
Copy the full SHA ee82c8cView commit details