Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/2590

struct Parser {
tokens: Vec<isize> ,
}
Expand Down
17 changes: 17 additions & 0 deletions tests/ui/borrowck/cannot-move-out-of-borrowed-field.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// https://github.com/rust-lang/rust/issues/2590

struct Parser {
tokens: Vec<isize> ,
}

trait Parse {
fn parse(&self) -> Vec<isize> ;
}

impl Parse for Parser {
fn parse(&self) -> Vec<isize> {
self.tokens //~ ERROR cannot move out
}
}

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/4335

#![feature(fn_traits)]

fn id<T>(t: T) -> T { t }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/3021

fn siphash(k0 : u64) {

struct SipHash {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/17252

const FOO: usize = FOO; //~ ERROR E0391
//@ ignore-parallel-frontend query cycle
fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/2150

#![deny(unreachable_code)]
#![allow(unused_variables)]
#![allow(dead_code)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/4972

#![feature(box_patterns)]

trait MyTrait {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ dont-require-annotations: NOTE
// https://github.com/rust-lang/rust/issues/5100

#![feature(box_patterns)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/17800

enum MyOption<T> {
MySome(T),
MyNone,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/3702

pub trait ToPrimitive {
fn to_int(&self) -> isize { 0 }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/4265
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be moved to ui/traits, there are no traits involved at all.


struct Foo {
baz: usize
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/4736

struct NonCopyable(());

fn main() {
Expand Down
Loading