Skip to content

Commit 9b5acca

Browse files
committed
Fallout in tests
1 parent dd31bb2 commit 9b5acca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+117
-216
lines changed

src/test/auxiliary/coherence_orphan_lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
pub trait TheTrait<T> : ::std::marker::PhantomFn<T> {
11+
pub trait TheTrait<T> {
1212
fn the_fn(&self);
1313
}

src/test/auxiliary/lang-item-public.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
#![no_std]
1313
#![feature(lang_items)]
1414

15-
#[lang="phantom_fn"]
16-
pub trait PhantomFn<A:?Sized,R:?Sized=()> { }
17-
impl<A:?Sized, R:?Sized, U:?Sized> PhantomFn<A,R> for U { }
18-
1915
#[lang="sized"]
20-
pub trait Sized : PhantomFn<Self> {}
16+
pub trait Sized { }
2117

2218
#[lang="panic"]
2319
fn panic(_: &(&'static str, &'static str, usize)) -> ! { loop {} }
@@ -29,7 +25,7 @@ extern fn stack_exhausted() {}
2925
extern fn eh_personality() {}
3026

3127
#[lang="copy"]
32-
pub trait Copy : PhantomFn<Self> {
28+
pub trait Copy {
3329
// Empty.
3430
}
3531

src/test/compile-fail/associated-types-ICE-when-projecting-out-of-err.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@
1616
#![feature(no_std)]
1717
#![no_std]
1818

19-
#[lang="phantom_fn"]
20-
pub trait PhantomFn<A:?Sized,R:?Sized=()> { }
21-
impl<A:?Sized, R:?Sized, U:?Sized> PhantomFn<A,R> for U { }
22-
2319
#[lang="sized"]
24-
pub trait Sized : PhantomFn<Self> {
20+
pub trait Sized {
2521
// Empty.
2622
}
2723

src/test/compile-fail/issue-13853-2.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::marker::PhantomFn;
12-
13-
trait FromStructReader<'a> : PhantomFn<(Self,&'a ())> { }
11+
trait FromStructReader<'a> { }
1412
trait ResponseHook {
1513
fn get<'a, T: FromStructReader<'a>>(&'a self);
1614
}

src/test/compile-fail/issue-19660.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@
1313
#![feature(lang_items, start, no_std)]
1414
#![no_std]
1515

16-
#[lang="phantom_fn"]
17-
trait PhantomFn<A:?Sized,R:?Sized=()> { }
18-
impl<A:?Sized, R:?Sized, U:?Sized> PhantomFn<A,R> for U { }
19-
2016
#[lang = "sized"]
21-
trait Sized : PhantomFn<Self> {}
17+
trait Sized { }
2218

2319
#[start]
2420
fn main(_: isize, _: *const *const u8) -> isize {

src/test/compile-fail/kindck-impl-type-params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn g<T>(val: T) {
4141
fn foo<'a>() {
4242
let t: S<&'a isize> = S(marker::PhantomData);
4343
let a = &t as &Gettable<&'a isize>;
44-
//~^ ERROR cannot infer
44+
//~^ ERROR does not fulfill
4545
}
4646

4747
fn foo2<'a>() {

src/test/compile-fail/lint-unsafe-code.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,15 @@
1212
#![allow(dead_code)]
1313
#![deny(unsafe_code)]
1414

15-
use std::marker::PhantomFn;
16-
1715
struct Bar;
1816
struct Bar2;
1917
struct Bar3;
2018

2119
#[allow(unsafe_code)]
2220
mod allowed_unsafe {
23-
use std::marker::PhantomFn;
2421
fn allowed() { unsafe {} }
2522
unsafe fn also_allowed() {}
26-
unsafe trait AllowedUnsafe : PhantomFn<Self> {}
23+
unsafe trait AllowedUnsafe { }
2724
unsafe impl AllowedUnsafe for super::Bar {}
2825
}
2926

@@ -34,7 +31,7 @@ macro_rules! unsafe_in_macro {
3431
}
3532

3633
unsafe fn baz() {} //~ ERROR: declaration of an `unsafe` function
37-
unsafe trait Foo : PhantomFn<Self> {} //~ ERROR: declaration of an `unsafe` trait
34+
unsafe trait Foo {} //~ ERROR: declaration of an `unsafe` trait
3835
unsafe impl Foo for Bar {} //~ ERROR: implementation of an `unsafe` trait
3936

4037
trait Baz {

src/test/compile-fail/object-safety-phantom-fn.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@
1313
#![feature(rustc_attrs)]
1414
#![allow(dead_code)]
1515

16-
use std::marker::PhantomFn;
17-
18-
trait Baz : PhantomFn<Self> {
16+
trait Baz {
1917
}
2018

21-
trait Bar<T> : PhantomFn<(Self, T)> {
19+
trait Bar<T> {
2220
}
2321

2422
fn make_bar<T:Bar<u32>>(t: &T) -> &Bar<u32> {

src/test/compile-fail/on-unimplemented-bad-anno.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313

1414
#![allow(unused)]
1515

16-
use std::marker;
17-
1816
#[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}`"]
1917
trait Foo<Bar, Baz, Quux>
20-
: marker::PhantomFn<(Self,Bar,Baz,Quux)>
2118
{}
2219

2320
#[rustc_on_unimplemented="a collection of type `{Self}` cannot be built from an iterator over elements of type `{A}`"]
@@ -28,19 +25,16 @@ trait MyFromIterator<A> {
2825

2926
#[rustc_on_unimplemented] //~ ERROR this attribute must have a value
3027
trait BadAnnotation1
31-
: marker::MarkerTrait
3228
{}
3329

3430
#[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"]
3531
//~^ ERROR there is no type parameter C on trait BadAnnotation2
3632
trait BadAnnotation2<A,B>
37-
: marker::PhantomFn<(Self,A,B)>
3833
{}
3934

4035
#[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`"]
4136
//~^ only named substitution parameters are allowed
4237
trait BadAnnotation3<A,B>
43-
: marker::PhantomFn<(Self,A,B)>
4438
{}
4539

4640
pub fn main() {

src/test/compile-fail/on-unimplemented.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111

1212
#![feature(on_unimplemented)]
1313

14-
use std::marker;
15-
1614
#[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}`"]
1715
trait Foo<Bar, Baz, Quux>
18-
: marker::PhantomFn<(Self,Bar,Baz,Quux)>
1916
{}
2017

2118
fn foobar<U: Clone, T: Foo<u8, U, u32>>() -> T {

0 commit comments

Comments
 (0)