Rebased
This commit is contained in:
parent
4e8e64140f
commit
73c2e768d6
10 changed files with 56 additions and 72 deletions
|
|
@ -34,8 +34,9 @@ fn dent<C:BoxCar>(c: C, color: C::Color) {
|
|||
|
||||
fn dent_object<COLOR>(c: BoxCar<Color=COLOR>) {
|
||||
//~^ ERROR ambiguous associated type
|
||||
//~| ERROR the associated type `Color` (from the trait `Box`) must be specified
|
||||
//~| ERROR the associated type `Color` (from the trait `Vehicle`) must be specified
|
||||
//~| ERROR the value of the associated type `Color` (from the trait `Vehicle`) must be specified
|
||||
//~| NOTE could derive from `Vehicle`
|
||||
//~| NOTE could derive from `Box`
|
||||
}
|
||||
|
||||
fn paint<C:BoxCar>(c: C, d: C::Color) {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use std::ops::{Add, Sub};
|
|||
|
||||
type Test = Add +
|
||||
//~^ ERROR the type parameter `RHS` must be explicitly specified in an object type because its default value `Self` references the type `Self`
|
||||
//~^^ ERROR the value of the associated type `Output` (from the trait `core::ops::Add`) must be specified [E0191]
|
||||
Sub;
|
||||
//~^ ERROR only the builtin traits can be used as closure or object bounds
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#![ crate_name = "test" ]
|
||||
#![allow(unstable)]
|
||||
#![feature(box_syntax, old_io, rustc_private, core)]
|
||||
#![feature(box_syntax, old_io, rustc_private, core, zero_one)]
|
||||
|
||||
extern crate graphviz;
|
||||
// A simple rust project
|
||||
|
|
@ -25,7 +25,7 @@ use std::old_io::stdio::println;
|
|||
use sub::sub2 as msalias;
|
||||
use sub::sub2;
|
||||
use sub::sub2::nested_struct as sub_struct;
|
||||
use std::num::Float;
|
||||
use std::num::One;
|
||||
use std::num::cast;
|
||||
use std::num::{from_int,from_i8,from_i32};
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ fn test_alias<I: Iterator>(i: Option<<I as Iterator>::Item>) {
|
|||
let s = sub_struct{ field2: 45, };
|
||||
|
||||
// import tests
|
||||
fn foo(x: &Float) {}
|
||||
fn foo(x: &One) {}
|
||||
let _: Option<u8> = from_i32(45);
|
||||
|
||||
let x = 42;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue