mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 10:05:06 +03:00
Move regression test for #83512 into doc_keyword.rs
This commit is contained in:
@@ -10,3 +10,11 @@ fn hell() {}
|
||||
|
||||
#[doc(keyword = "hall")] //~ ERROR
|
||||
fn foo() {}
|
||||
|
||||
|
||||
// Regression test for the ICE described in #83512.
|
||||
trait Foo {
|
||||
#[doc(keyword = "match")]
|
||||
//~^ ERROR: `#[doc(keyword = "...")]` can only be used on modules
|
||||
fn quux() {}
|
||||
}
|
||||
|
||||
@@ -10,11 +10,17 @@ error: `#[doc(keyword = "...")]` can only be used on modules
|
||||
LL | #[doc(keyword = "hall")]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[doc(keyword = "...")]` can only be used on modules
|
||||
--> $DIR/doc_keyword.rs:17:11
|
||||
|
|
||||
LL | #[doc(keyword = "match")]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#![doc(keyword = "...")]` isn't allowed as a crate-level attribute
|
||||
--> $DIR/doc_keyword.rs:4:8
|
||||
|
|
||||
LL | #![doc(keyword = "hello")]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
// Regression test for the ICE described in #83512.
|
||||
|
||||
#![feature(doc_keyword)]
|
||||
#![crate_type="lib"]
|
||||
|
||||
trait Foo {
|
||||
#[doc(keyword = "match")]
|
||||
//~^ ERROR: `#[doc(keyword = "...")]` can only be used on modules
|
||||
fn quux() {}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
error: `#[doc(keyword = "...")]` can only be used on modules
|
||||
--> $DIR/issue-83512.rs:7:11
|
||||
|
|
||||
LL | #[doc(keyword = "match")]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Reference in New Issue
Block a user