more fixed issues
This commit is contained in:
parent
e0c98e2a33
commit
a040b4189d
4 changed files with 41 additions and 0 deletions
|
|
@ -1769,6 +1769,13 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
|
|||
the type was too big.</p>"
|
||||
);
|
||||
}
|
||||
Err(LayoutError::NormalizationFailure(_, _)) => {
|
||||
writeln!(
|
||||
w,
|
||||
"<p><strong>Note:</strong> Encountered an error during type layout; \
|
||||
the type was not normalizable.</p>"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
writeln!(w, "</div>");
|
||||
|
|
|
|||
9
src/test/ui/associated-types/issue-85103.rs
Normal file
9
src/test/ui/associated-types/issue-85103.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#![feature(rustc_attrs)]
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
#[rustc_layout(debug)]
|
||||
type Edges<'a, E> = Cow<'a, [E]>;
|
||||
//~^ ERROR layout error: NormalizationFailure
|
||||
|
||||
fn main() {}
|
||||
8
src/test/ui/associated-types/issue-85103.stderr
Normal file
8
src/test/ui/associated-types/issue-85103.stderr
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
error: layout error: NormalizationFailure(<[E] as std::borrow::ToOwned>::Owned, Type(<[E] as std::borrow::ToOwned>::Owned))
|
||||
--> $DIR/issue-85103.rs:6:1
|
||||
|
|
||||
LL | type Edges<'a, E> = Cow<'a, [E]>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
17
src/test/ui/associated-types/issue-91231.rs
Normal file
17
src/test/ui/associated-types/issue-91231.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// check-pass
|
||||
|
||||
#![feature(extern_types)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
extern {
|
||||
type Extern;
|
||||
}
|
||||
|
||||
trait Trait {
|
||||
type Type;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn f<'a>(_: <&'a Extern as Trait>::Type) where &'a Extern: Trait {}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue