Skip to content

Commit a74ebff

Browse files
committed
---
yaml --- r: 221066 b: refs/heads/tmp c: 6b10efc h: refs/heads/master v: v3
1 parent 5b4540d commit a74ebff

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
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: c8bab9d06a179028a0d5129aa62f09d694d9cc49
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 7d984ef6df64de8d7882912ccae16d39ded59a21
28+
refs/heads/tmp: 6b10efcc8b2cf9813efca5c0be3aaebf848fb82f
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: e58601ab085591c71a27ae82137fc313222c2270
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/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)