Skip to content

Commit 005ca94

Browse files
committed
---
yaml --- r: 220698 b: refs/heads/master c: 6b10efc h: refs/heads/master v: v3
1 parent 768285b commit 005ca94

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 7d984ef6df64de8d7882912ccae16d39ded59a21
2+
refs/heads/master: 6b10efcc8b2cf9813efca5c0be3aaebf848fb82f
33
refs/heads/snap-stage3: d4432b37378ec55450e06799f5344b4b0f4b94e0
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/libcollections/borrow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl<'a, B: ?Sized> Clone for Cow<'a, B> where B: ToOwned {
215215
impl<'a, B: ?Sized> Cow<'a, B> where B: ToOwned {
216216
/// Acquires a mutable reference to the owned form of the data.
217217
///
218-
/// Copies the data if it is not already owned.
218+
/// Clones the data if it is not already owned.
219219
///
220220
/// # Examples
221221
///
@@ -241,7 +241,7 @@ impl<'a, B: ?Sized> Cow<'a, B> where B: ToOwned {
241241

242242
/// Extracts the owned data.
243243
///
244-
/// Copies the data if it is not already owned.
244+
/// Clones the data if it is not already owned.
245245
///
246246
/// # Examples
247247
///
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright 2015 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+
trait SomeTrait {}
12+
struct Meow;
13+
impl SomeTrait for Meow {}
14+
15+
struct Foo<'a> {
16+
x: &'a SomeTrait,
17+
y: &'a SomeTrait,
18+
}
19+
20+
impl<'a> Foo<'a> {
21+
pub fn new<'b>(x: &'b SomeTrait, y: &'b SomeTrait) -> Foo<'b> { Foo { x: x, y: y } }
22+
}
23+
24+
fn main() {
25+
let r = Meow;
26+
let s = Meow;
27+
let q = Foo::new(&r as &SomeTrait, &s as &SomeTrait);
28+
}

0 commit comments

Comments
 (0)