-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Gracefully handle missing typeck information if typeck errored #120020
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
This has the problem that now, fn x() {}
fn main() {
let s = [(); { loop {} }];
x();
}
Because dead_code assumes dead until proven live. Would it make more sense to do it at a finer grained level instead of the body? |
🤦 good point. Yea we can do it more fine-grained, but some ways to do that are effectively papering over some issues. I'll check if there is a reasonable way to do it |
0787a5f
to
3599c18
Compare
@bors r+ |
… r=compiler-errors Gracefully handle missing typeck information if typeck errored fixes rust-lang#116893 I created some logs and the typeck of `fn main` is exactly the same, no matter whether the constant's body is what it is, or if it is replaced with `panic!()`. The latter will cause the ICE not to be emitted though. The reason for that is that we abort compilation if *errors* were emitted, but not if *lint errors* were emitted. This took me way too long to debug, and is another reason why I would have liked rust-lang/compiler-team#633
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#119062 (Deny braced macro invocations in let-else) - rust-lang#119922 (Rework how diagnostic lints are stored.) - rust-lang#119978 (Move async closure parameters into the resultant closure's future eagerly) - rust-lang#119984 (Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.) - rust-lang#120020 (Gracefully handle missing typeck information if typeck errored) - rust-lang#120021 (don't store const var origins for known vars) r? `@ghost` `@rustbot` modify labels: rollup
… r=compiler-errors Gracefully handle missing typeck information if typeck errored fixes rust-lang#116893 I created some logs and the typeck of `fn main` is exactly the same, no matter whether the constant's body is what it is, or if it is replaced with `panic!()`. The latter will cause the ICE not to be emitted though. The reason for that is that we abort compilation if *errors* were emitted, but not if *lint errors* were emitted. This took me way too long to debug, and is another reason why I would have liked rust-lang/compiler-team#633
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#119855 (Enable Static Builds for FreeBSD) - rust-lang#119922 (Rework how diagnostic lints are stored.) - rust-lang#119978 (Move async closure parameters into the resultant closure's future eagerly) - rust-lang#119984 (Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.) - rust-lang#120020 (Gracefully handle missing typeck information if typeck errored) - rust-lang#120021 (don't store const var origins for known vars) - rust-lang#120032 (Fix `rustc_abi` build on stable) r? `@ghost` `@rustbot` modify labels: rollup
@bors rollup |
… r=compiler-errors Gracefully handle missing typeck information if typeck errored fixes rust-lang#116893 I created some logs and the typeck of `fn main` is exactly the same, no matter whether the constant's body is what it is, or if it is replaced with `panic!()`. The latter will cause the ICE not to be emitted though. The reason for that is that we abort compilation if *errors* were emitted, but not if *lint errors* were emitted. This took me way too long to debug, and is another reason why I would have liked rust-lang/compiler-team#633
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#115291 (Save liveness results for DestinationPropagation) - rust-lang#119651 (proc_macro: Add Literal::c_string constructor) - rust-lang#119855 (Enable Static Builds for FreeBSD) - rust-lang#119955 (Modify GenericArg and Term structs to use strict provenance rules) - rust-lang#119975 (Don't ICE if TAIT-defining fn contains a closure with `_` in return type) - rust-lang#119984 (Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.) - rust-lang#120001 (Consistently unset RUSTC_BOOTSTRAP when compiling bootstrap) - rust-lang#120020 (Gracefully handle missing typeck information if typeck errored) - rust-lang#120032 (Fix `rustc_abi` build on stable) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#119855 (Enable Static Builds for FreeBSD) - rust-lang#119922 (Rework how diagnostic lints are stored.) - rust-lang#119978 (Move async closure parameters into the resultant closure's future eagerly) - rust-lang#119984 (Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.) - rust-lang#120020 (Gracefully handle missing typeck information if typeck errored) - rust-lang#120021 (don't store const var origins for known vars) - rust-lang#120032 (Fix `rustc_abi` build on stable) r? `@ghost` `@rustbot` modify labels: rollup
… r=compiler-errors Gracefully handle missing typeck information if typeck errored fixes rust-lang#116893 I created some logs and the typeck of `fn main` is exactly the same, no matter whether the constant's body is what it is, or if it is replaced with `panic!()`. The latter will cause the ICE not to be emitted though. The reason for that is that we abort compilation if *errors* were emitted, but not if *lint errors* were emitted. This took me way too long to debug, and is another reason why I would have liked rust-lang/compiler-team#633
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#115291 (Save liveness results for DestinationPropagation) - rust-lang#119855 (Enable Static Builds for FreeBSD) - rust-lang#119975 (Don't ICE if TAIT-defining fn contains a closure with `_` in return type) - rust-lang#119984 (Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.) - rust-lang#120001 (Consistently unset RUSTC_BOOTSTRAP when compiling bootstrap) - rust-lang#120020 (Gracefully handle missing typeck information if typeck errored) - rust-lang#120031 (Construct closure type eagerly) - rust-lang#120032 (Fix `rustc_abi` build on stable) - rust-lang#120039 (pat_analysis: Don't rely on contiguous `VariantId`s outside of rustc) - rust-lang#120044 (Fix typo in comments (in_place_collect)) - rust-lang#120056 (Use FnOnceOutput instead of FnOnce where expected) r? `@ghost` `@rustbot` modify labels: rollup
… r=compiler-errors Gracefully handle missing typeck information if typeck errored fixes rust-lang#116893 I created some logs and the typeck of `fn main` is exactly the same, no matter whether the constant's body is what it is, or if it is replaced with `panic!()`. The latter will cause the ICE not to be emitted though. The reason for that is that we abort compilation if *errors* were emitted, but not if *lint errors* were emitted. This took me way too long to debug, and is another reason why I would have liked rust-lang/compiler-team#633
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#115291 (Save liveness results for DestinationPropagation) - rust-lang#119855 (Enable Static Builds for FreeBSD) - rust-lang#119975 (Don't ICE if TAIT-defining fn contains a closure with `_` in return type) - rust-lang#120001 (Consistently unset RUSTC_BOOTSTRAP when compiling bootstrap) - rust-lang#120020 (Gracefully handle missing typeck information if typeck errored) - rust-lang#120031 (Construct closure type eagerly) - rust-lang#120032 (Fix `rustc_abi` build on stable) - rust-lang#120039 (pat_analysis: Don't rely on contiguous `VariantId`s outside of rustc) - rust-lang#120044 (Fix typo in comments (in_place_collect)) - rust-lang#120056 (Use FnOnceOutput instead of FnOnce where expected) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#115291 (Save liveness results for DestinationPropagation) - rust-lang#119855 (Enable Static Builds for FreeBSD) - rust-lang#119975 (Don't ICE if TAIT-defining fn contains a closure with `_` in return type) - rust-lang#120001 (Consistently unset RUSTC_BOOTSTRAP when compiling bootstrap) - rust-lang#120020 (Gracefully handle missing typeck information if typeck errored) - rust-lang#120031 (Construct closure type eagerly) - rust-lang#120032 (Fix `rustc_abi` build on stable) - rust-lang#120039 (pat_analysis: Don't rely on contiguous `VariantId`s outside of rustc) - rust-lang#120044 (Fix typo in comments (in_place_collect)) - rust-lang#120056 (Use FnOnceOutput instead of FnOnce where expected) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#120020 - oli-obk:long_const_eval_err_taint, r=compiler-errors Gracefully handle missing typeck information if typeck errored fixes rust-lang#116893 I created some logs and the typeck of `fn main` is exactly the same, no matter whether the constant's body is what it is, or if it is replaced with `panic!()`. The latter will cause the ICE not to be emitted though. The reason for that is that we abort compilation if *errors* were emitted, but not if *lint errors* were emitted. This took me way too long to debug, and is another reason why I would have liked rust-lang/compiler-team#633
fixes #116893
I created some logs and the typeck of
fn main
is exactly the same, no matter whether the constant's body is what it is, or if it is replaced withpanic!()
. The latter will cause the ICE not to be emitted though. The reason for that is that we abort compilation if errors were emitted, but not if lint errors were emitted. This took me way too long to debug, and is another reason why I would have liked rust-lang/compiler-team#633