cleaned up some tests
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
//! Checks error handling for undefined custom attributes.
|
||||||
|
|
||||||
#![feature(stmt_expr_attributes)]
|
#![feature(stmt_expr_attributes)]
|
||||||
|
|
||||||
#[foo] //~ ERROR cannot find attribute `foo` in this scope
|
#[foo] //~ ERROR cannot find attribute `foo` in this scope
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
error: cannot find attribute `foo` in this scope
|
error: cannot find attribute `foo` in this scope
|
||||||
--> $DIR/custom_attribute.rs:3:3
|
--> $DIR/attr_unknown_custom_attr.rs:5:3
|
||||||
|
|
|
|
||||||
LL | #[foo]
|
LL | #[foo]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: cannot find attribute `foo` in this scope
|
error: cannot find attribute `foo` in this scope
|
||||||
--> $DIR/custom_attribute.rs:5:7
|
--> $DIR/attr_unknown_custom_attr.rs:7:7
|
||||||
|
|
|
|
||||||
LL | #[foo]
|
LL | #[foo]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: cannot find attribute `foo` in this scope
|
error: cannot find attribute `foo` in this scope
|
||||||
--> $DIR/custom_attribute.rs:7:7
|
--> $DIR/attr_unknown_custom_attr.rs:9:7
|
||||||
|
|
|
|
||||||
LL | #[foo]
|
LL | #[foo]
|
||||||
| ^^^
|
| ^^^
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Checks error handling for mismatched `--crate-name` and `#![crate_name]` values.
|
||||||
|
|
||||||
//@ compile-flags: --crate-name foo
|
//@ compile-flags: --crate-name foo
|
||||||
|
|
||||||
#![crate_name = "bar"]
|
#![crate_name = "bar"]
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
error: `--crate-name` and `#[crate_name]` are required to match, but `foo` != `bar`
|
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"]
|
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 {}
|
mod existent {}
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
error[E0433]: failed to resolve: could not find `nonexistent` in `existent`
|
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]
|
LL | #[existent::nonexistent]
|
||||||
| ^^^^^^^^^^^ could not find `nonexistent` in `existent`
|
| ^^^^^^^^^^^ 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
|
//@ run-pass
|
||||||
//@ ignore-emscripten apparently blows the stack
|
//@ ignore-emscripten apparently blows the stack
|
||||||
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//! Checks run with a custom test framework and indexed test functions.
|
||||||
|
|
||||||
//@ compile-flags: --test
|
//@ compile-flags: --test
|
||||||
//@ run-pass
|
//@ run-pass
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
//@ run-pass
|
//! Checks basic default method functionality.
|
||||||
|
|
||||||
#![allow(dead_code)]
|
//@ run-pass
|
||||||
|
|
||||||
trait Foo {
|
trait Foo {
|
||||||
fn f(&self) {
|
fn f(&self) {
|
||||||
@@ -10,9 +10,7 @@ trait Foo {
|
|||||||
fn g(&self);
|
fn g(&self);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct A {
|
struct A;
|
||||||
x: isize
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Foo for A {
|
impl Foo for A {
|
||||||
fn g(&self) {
|
fn g(&self) {
|
||||||
@@ -21,6 +19,6 @@ impl Foo for A {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let a = A { x: 1 };
|
let a = A;
|
||||||
a.f();
|
a.f();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user