]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-37291/main.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-37291 / main.rs
1 // run-pass
2 #![allow(unused_imports)]
3 // aux-build:lib.rs
4
5 // Regression test for #37291. The problem was that the starting
6 // environment for a specialization check was not including the
7 // where-clauses from the impl when attempting to normalize the impl's
8 // trait-ref, so things like `<C as Foo>::Item` could not resolve,
9 // since the `C: Foo` trait bound was not included in the environment.
10
11 extern crate lib;
12
13 use lib::{CV, WrapperB, WrapperC};
14
15 fn main() {
16 let a = WrapperC(CV);
17 let b = WrapperC(CV);
18 if false {
19 let _ = a * b;
20 }
21 }