Accept less invalid Rust in rustdoc
This commit is contained in:
parent
22b27120b9
commit
4512f211ae
35 changed files with 428 additions and 127 deletions
|
@ -1,7 +1,6 @@
|
|||
// check-pass
|
||||
|
||||
pub fn f() -> impl Sized {
|
||||
pub enum E {
|
||||
//~^ ERROR: recursive type
|
||||
V(E),
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
error[E0072]: recursive type `f::E` has infinite size
|
||||
--> $DIR/infinite-recursive-type-2.rs:2:5
|
||||
|
|
||||
LL | pub enum E {
|
||||
| ^^^^^^^^^^
|
||||
LL |
|
||||
LL | V(E),
|
||||
| - recursive without indirection
|
||||
|
|
||||
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
||||
|
|
||||
LL | V(Box<E>),
|
||||
| ++++ +
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0072`.
|
|
@ -1,7 +1,6 @@
|
|||
// check-pass
|
||||
|
||||
fn f() -> impl Sized {
|
||||
enum E {
|
||||
//~^ ERROR: recursive type
|
||||
V(E),
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
error[E0072]: recursive type `f::E` has infinite size
|
||||
--> $DIR/infinite-recursive-type.rs:2:5
|
||||
|
|
||||
LL | enum E {
|
||||
| ^^^^^^
|
||||
LL |
|
||||
LL | V(E),
|
||||
| - recursive without indirection
|
||||
|
|
||||
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
||||
|
|
||||
LL | V(Box<E>),
|
||||
| ++++ +
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0072`.
|
Loading…
Add table
Add a link
Reference in a new issue