cleaned up some tests
This commit is contained in:
parent
c57119b9a1
commit
85ce9ee481
10 changed files with 18 additions and 19 deletions
|
|
@ -1,3 +1,5 @@
|
|||
//! Checks error handling for undefined custom attributes.
|
||||
|
||||
#![feature(stmt_expr_attributes)]
|
||||
|
||||
#[foo] //~ ERROR cannot find attribute `foo` in this scope
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
error: cannot find attribute `foo` in this scope
|
||||
--> $DIR/custom_attribute.rs:3:3
|
||||
--> $DIR/attr_unknown_custom_attr.rs:5:3
|
||||
|
|
||||
LL | #[foo]
|
||||
| ^^^
|
||||
|
||||
error: cannot find attribute `foo` in this scope
|
||||
--> $DIR/custom_attribute.rs:5:7
|
||||
--> $DIR/attr_unknown_custom_attr.rs:7:7
|
||||
|
|
||||
LL | #[foo]
|
||||
| ^^^
|
||||
|
||||
error: cannot find attribute `foo` in this scope
|
||||
--> $DIR/custom_attribute.rs:7:7
|
||||
--> $DIR/attr_unknown_custom_attr.rs:9:7
|
||||
|
|
||||
LL | #[foo]
|
||||
| ^^^
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
//! Checks error handling for mismatched `--crate-name` and `#![crate_name]` values.
|
||||
|
||||
//@ compile-flags: --crate-name foo
|
||||
|
||||
#![crate_name = "bar"]
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error: `--crate-name` and `#[crate_name]` are required to match, but `foo` != `bar`
|
||||
--> $DIR/crate-name-mismatch.rs:3:1
|
||||
--> $DIR/crate-name-mismatch.rs:5:1
|
||||
|
|
||||
LL | #![crate_name = "bar"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Unresolved multi-segment attributes are not treated as custom.
|
||||
//! Unresolved multi-segment attributes are not treated as custom.
|
||||
|
||||
mod existent {}
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0433]: failed to resolve: could not find `nonexistent` in `existent`
|
||||
--> $DIR/custom-attribute-multisegment.rs:5:13
|
||||
--> $DIR/custom_attr_multisegment_error.rs:5:13
|
||||
|
|
||||
LL | #[existent::nonexistent]
|
||||
| ^^^^^^^^^^^ could not find `nonexistent` in `existent`
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
//@ check-pass
|
||||
|
||||
trait Foo {
|
||||
fn m(&self, _:isize) { }
|
||||
}
|
||||
|
||||
pub fn main() { }
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
//! Checks deep recursion behavior.
|
||||
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten apparently blows the stack
|
||||
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
//! Checks run with a custom test framework and indexed test functions.
|
||||
|
||||
//@ compile-flags: --test
|
||||
//@ run-pass
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
//@ run-pass
|
||||
//! Checks basic default method functionality.
|
||||
|
||||
#![allow(dead_code)]
|
||||
//@ run-pass
|
||||
|
||||
trait Foo {
|
||||
fn f(&self) {
|
||||
|
|
@ -10,9 +10,7 @@ trait Foo {
|
|||
fn g(&self);
|
||||
}
|
||||
|
||||
struct A {
|
||||
x: isize
|
||||
}
|
||||
struct A;
|
||||
|
||||
impl Foo for A {
|
||||
fn g(&self) {
|
||||
|
|
@ -21,6 +19,6 @@ impl Foo for A {
|
|||
}
|
||||
|
||||
pub fn main() {
|
||||
let a = A { x: 1 };
|
||||
let a = A;
|
||||
a.f();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue