Skip to content

Commit 061450d

Browse files
committed
auto merge of #14066 : edwardw/rust/pod-to-copy, r=alexcrichton
Some error messages still use the word `Pod` instead of `Copy`. Renames them.
2 parents a7d877c + 0f25aad commit 061450d

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

src/librustc/util/ppaux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ impl Repr for ty::ParamBounds {
584584
ty::BoundStatic => "'static".to_owned(),
585585
ty::BoundSend => "Send".to_owned(),
586586
ty::BoundSized => "Sized".to_owned(),
587-
ty::BoundCopy => "Pod".to_owned(),
587+
ty::BoundCopy => "Copy".to_owned(),
588588
ty::BoundShare => "Share".to_owned(),
589589
});
590590
}
@@ -862,7 +862,7 @@ impl UserString for ty::BuiltinBound {
862862
ty::BoundStatic => "'static".to_owned(),
863863
ty::BoundSend => "Send".to_owned(),
864864
ty::BoundSized => "Sized".to_owned(),
865-
ty::BoundCopy => "Pod".to_owned(),
865+
ty::BoundCopy => "Copy".to_owned(),
866866
ty::BoundShare => "Share".to_owned(),
867867
}
868868
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// Tests that the error message uses the word Copy, not Pod.
12+
13+
fn check_bound<T:Copy>(_: T) {}
14+
15+
fn main() {
16+
check_bound("nocopy".to_owned()); //~ ERROR does not fulfill `Copy`
17+
}

0 commit comments

Comments
 (0)