-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Bypass const_item_mutation if const's type has Drop impl #77251
Merged
Merged
Commits on Oct 1, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 17db1cb - Browse repository at this point
Copy the full SHA 17db1cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0dfe7b6 - Browse repository at this point
Copy the full SHA 0dfe7b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb760b5 - Browse repository at this point
Copy the full SHA bb760b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f6284c - Browse repository at this point
Copy the full SHA 0f6284cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 352ce8b - Browse repository at this point
Copy the full SHA 352ce8bView commit details -
Skip dropck::check_drop_impl in is_const_item_without_destructor
adt_destructor by default also validates the Drop impl using dropck::check_drop_impl, which contains an expect_local(). This leads to ICE in check_const_item_mutation if the const's type is not a local type. thread 'rustc' panicked at 'DefId::expect_local: `DefId(5:4805 ~ alloc[d7e9]::vec::{impl#50})` isn't local', compiler/rustc_span/src/def_id.rs:174:43 stack backtrace: 0: rust_begin_unwind 1: rustc_span::def_id::DefId::expect_local::{{closure}} 2: rustc_typeck::check::dropck::check_drop_impl 3: rustc_middle::ty::util::<impl rustc_middle::ty::context::TyCtxt>::calculate_dtor::{{closure}} 4: rustc_middle::ty::trait_def::<impl rustc_middle::ty::context::TyCtxt>::for_each_relevant_impl 5: rustc_middle::ty::util::<impl rustc_middle::ty::context::TyCtxt>::calculate_dtor 6: rustc_typeck::check::adt_destructor 7: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::adt_destructor>::compute 8: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl 9: rustc_query_system::query::plumbing::get_query_impl 10: rustc_mir::transform::check_const_item_mutation::ConstMutationChecker::is_const_item_without_destructor
Configuration menu - View commit details
-
Copy full SHA for 41baa09 - Browse repository at this point
Copy the full SHA 41baa09View commit details -
Configuration menu - View commit details
-
Copy full SHA for eef5104 - Browse repository at this point
Copy the full SHA eef5104View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75c2fdf - Browse repository at this point
Copy the full SHA 75c2fdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 804d159 - Browse repository at this point
Copy the full SHA 804d159View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.