Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5983db9
rustdoc-search: parse and search with ML-style HOF
notriddle Jan 6, 2024
8eac04f
rustdoc: clean up search.js by removing empty sort case
notriddle Jan 6, 2024
df043c4
rustdoc: use `const` for the special type name ids
notriddle Jan 6, 2024
84d7a2c
rustdoc-search: add search query syntax `Fn(T) -> U`
notriddle Jan 6, 2024
3ab6936
mir-opt unnamed-fields filecheck annotations
Kirandevraj Mar 1, 2024
6f1156a
fixing mir pass name to text comment
Kirandevraj Mar 9, 2024
3af28f0
Fix 32-bit overflows in LLVM composite constants
erer1243 Mar 4, 2024
b66d7f5
Update books
rustbot Mar 11, 2024
779ac69
Update Windows platform support
ChrisDenton Mar 10, 2024
aeec0d1
Update /NODEFAUTLIB comment for msvc
ChrisDenton Mar 11, 2024
2a1d4dd
Don't ICE when non-self part of trait goal is constrained in new solver
compiler-errors Mar 11, 2024
0b6b330
Move project -> normalize, move normalize tests
compiler-errors Mar 11, 2024
f614eae
Remove some unnecessary allow(incomplete_features)
compiler-errors Mar 11, 2024
ba70528
updating variable names in CHECK
Kirandevraj Mar 11, 2024
7ec3516
Rollup merge of #115141 - ChrisDenton:windows-support, r=wesleywiser
matthiaskrgr Mar 11, 2024
c87410e
Rollup merge of #119676 - notriddle:notriddle/rustdoc-search-hof, r=G…
matthiaskrgr Mar 11, 2024
8fb5cda
Rollup merge of #121865 - Kirandevraj:unnamed-fields-filecheck, r=oli…
matthiaskrgr Mar 11, 2024
7a27bd3
Rollup merge of #122000 - erer1243:issue-121868, r=nikic
matthiaskrgr Mar 11, 2024
92e9023
Rollup merge of #122319 - compiler-errors:next-solver-normalizing-sel…
matthiaskrgr Mar 11, 2024
60d7ef8
Rollup merge of #122339 - rustbot:docs-update, r=ehuss
matthiaskrgr Mar 11, 2024
2b344e3
Rollup merge of #122342 - ChrisDenton:defautlib, r=petrochenkov
matthiaskrgr Mar 11, 2024
2336a89
Rollup merge of #122343 - compiler-errors:rando, r=fmease
matthiaskrgr Mar 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't ICE when non-self part of trait goal is constrained in new solver
  • Loading branch information
compiler-errors committed Mar 11, 2024
commit 2a1d4dd6e3204e24467143d228107058032b2962
4 changes: 3 additions & 1 deletion compiler/rustc_trait_selection/src/solve/assembly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {

let goal =
goal.with(self.tcx(), goal.predicate.with_self_ty(self.tcx(), normalized_self_ty));
debug_assert_eq!(goal, self.resolve_vars_if_possible(goal));
// Vars that show up in the rest of the goal substs may have been constrained by
// normalizing the self type as well, since type variables are not uniquified.
let goal = self.resolve_vars_if_possible(goal);

let mut candidates = vec![];

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//@ check-pass

// This goal is also possible w/ a GAT, but lazy_type_alias
// makes the behavior a bit more readable.
#![feature(lazy_type_alias)]
//~^ WARN the feature `lazy_type_alias` is incomplete

struct Wr<T>(T);
trait Foo {}
impl Foo for Wr<i32> {}

type Alias<T> = (T,)
where Wr<T>: Foo;

fn hello<T>() where Alias<T>: Into<(T,)>, Wr<T>: Foo {}

fn main() {
// When calling `hello`, proving `Alias<?0>: Into<(?0,)>` will require
// normalizing the self type of the goal. This will emit the where
// clause `Wr<?0>: Foo`, which constrains `?0` in both the self type
// *and* the non-self part of the goal. That used to trigger a debug
// assertion.
hello::<_>();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/normalize-self-type-constrains-trait-args.rs:5:12
|
LL | #![feature(lazy_type_alias)]
| ^^^^^^^^^^^^^^^
|
= note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
= note: `#[warn(incomplete_features)]` on by default

warning: 1 warning emitted