diff options
| author | bors <bors@rust-lang.org> | 2022-04-15 18:51:40 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-15 18:51:40 +0000 | 
| commit | 3f391b84552f210adec7893b50c5da74f9362ae4 (patch) | |
| tree | bd7084e37d615bb22152fce22c7c9328f5316c4f /compiler/rustc_trait_selection | |
| parent | 1e6fe5855a115ef7f17f3e17205fab7340775701 (diff) | |
| parent | fa281fdf65f63da72abfef83abeb8bea37fddfd9 (diff) | |
| download | rust-3f391b84552f210adec7893b50c5da74f9362ae4.tar.gz rust-3f391b84552f210adec7893b50c5da74f9362ae4.zip | |
Auto merge of #96087 - Dylan-DPC:rollup-k6yzk55, r=Dylan-DPC
Rollup of 11 pull requests Successful merges: - #94457 (Stabilize `derive_default_enum`) - #94461 (Create (unstable) 2024 edition) - #94849 (Check var scope if it exist) - #95194 (remove find_use_placement) - #95749 (only downgrade selection Error -> Ambiguous if type error is in predicate) - #96026 (couple of clippy::complexity fixes) - #96027 (remove function parameters only used in recursion) - #96034 ([test] Add test cases of untested functions for BTreeSet ) - #96040 (Use u32 instead of i32 for futexes.) - #96062 (docs: Update tests chapter for Termination stabilization) - #96065 (Refactor: Use `format-args-capture` and remove unnecessary nested blocks in rustc_typeck) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection')
3 files changed, 4 insertions, 4 deletions
| diff --git a/compiler/rustc_trait_selection/src/lib.rs b/compiler/rustc_trait_selection/src/lib.rs index 7523b844101..2ae7f34a91e 100644 --- a/compiler/rustc_trait_selection/src/lib.rs +++ b/compiler/rustc_trait_selection/src/lib.rs @@ -16,7 +16,7 @@ #![feature(box_patterns)] #![feature(control_flow_enum)] #![feature(crate_visibility_modifier)] -#![feature(derive_default_enum)] +#![cfg_attr(bootstrap, feature(derive_default_enum))] #![feature(drain_filter)] #![feature(hash_drain_filter)] #![feature(label_break_value)] diff --git a/compiler/rustc_trait_selection/src/traits/on_unimplemented.rs b/compiler/rustc_trait_selection/src/traits/on_unimplemented.rs index 38be28c07ff..ce0e0a21ff5 100644 --- a/compiler/rustc_trait_selection/src/traits/on_unimplemented.rs +++ b/compiler/rustc_trait_selection/src/traits/on_unimplemented.rs @@ -258,7 +258,7 @@ impl<'tcx> OnUnimplementedDirective { enclosing_scope = Some(enclosing_scope_.clone()); } - append_const_msg = command.append_const_msg.clone(); + append_const_msg = command.append_const_msg; } OnUnimplementedNote { diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs index 06f58240992..dbb6c54fcd9 100644 --- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs +++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs @@ -231,8 +231,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { // `Err(Unimplemented)` to `Ok(None)`. This helps us avoid // emitting additional spurious errors, since we're guaranteed // to have emitted at least one. - if stack.obligation.references_error() { - debug!("no results for error type, treating as ambiguous"); + if stack.obligation.predicate.references_error() { + debug!(?stack.obligation.predicate, "found error type in predicate, treating as ambiguous"); return Ok(None); } return Err(Unimplemented); | 
