Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 25 pull requests #49642

Merged
merged 65 commits into from
Apr 5, 2018
Merged
Changes from 3 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
c08902b
Prevent deprecation warning for items deprecated in the future
varkor Mar 19, 2018
ecaf1f5
Add future deprecation warning to rustdoc
varkor Mar 19, 2018
101e17d
Add tests for items deprecated in the future
varkor Mar 19, 2018
7fdee5d
fix targetted value background
GuillaumeGomez Mar 30, 2018
adaaeea
Add missing anchor for union type fields
GuillaumeGomez Mar 30, 2018
d0eeb29
Add support for variant and types fields for intra links
GuillaumeGomez Mar 30, 2018
fa1d125
Add test for rustdoc ignore test
Phlosioneer Mar 31, 2018
48e3c96
Fix tidy trailing newlines
Phlosioneer Mar 31, 2018
fb7deda
Add #[must_use] to a few standard library methods
scottmcm Mar 31, 2018
42bc071
Remove whitespace
Phlosioneer Mar 31, 2018
cb30975
Add ignore reason
Phlosioneer Mar 31, 2018
44ad8fd
Shorten deprecation note
varkor Mar 31, 2018
7a63900
Unignore borrowck test
Phlosioneer Apr 1, 2018
7a28ffc
Fix miri Discriminant() for non-ADT
bjorn3 Mar 31, 2018
8f9ec1c
avoid IdxSets containing garbage above the universe length
arielb1 Apr 1, 2018
196b142
Stabilize String::replace_range
tmccombs Apr 2, 2018
8531086
Add performance note to fs::read docs
mbrubeck Apr 2, 2018
f9cc030
Fix url for intra link provided method
GuillaumeGomez Apr 2, 2018
a2a0f21
Fix typo
rolfvandekrol Apr 2, 2018
b2ed9dd
Replace as_ref with &
varkor Apr 2, 2018
1c8d10b
Stabilize iter_rfold in 1.27.0
cuviper Apr 2, 2018
d8c4c83
Stabilize iter_rfind in 1.27.0
cuviper Apr 2, 2018
9db63bb
Stabilize iterator_try_fold in 1.27.0
cuviper Apr 2, 2018
58217ed
run-pass/attr-stmt-expr: expand test cases
abonander Apr 3, 2018
9ab5788
Fix "since" version for getpid feature.
tmccombs Apr 3, 2018
a64acaa
Merge remote-tracking branch 'upstream/master' into string-splice-sta…
tmccombs Apr 3, 2018
e75c6a7
Remove splice page from unstable book.
tmccombs Apr 3, 2018
f5c4265
Fix warning when compilin libcore on 16bit targets.
vadzimdambrouski Apr 3, 2018
93a3e93
tweak fmt::Arguments docs
durka Apr 3, 2018
333b0a0
tweak format_args! docs
durka Apr 3, 2018
da0ceef
Introduce Vec::resize_with method (see #41758)
djc Apr 1, 2018
77b570f
Re-write the documentation index
steveklabnik Apr 3, 2018
1ce98f3
Cross-reference fs::read functions from io::Read docs
mbrubeck Apr 2, 2018
390f836
Add performance notes to BufReader/BufWriter docs
mbrubeck Apr 2, 2018
3627e43
Add a test for the fix to issue #43058
lloydmeta Apr 4, 2018
f2cc501
Formatting
lloydmeta Apr 4, 2018
97ac479
Stabilize parent_id()
tmccombs Apr 4, 2018
db859f5
Update Cargo
matklad Apr 4, 2018
a981799
Regression test for #46314
valff Apr 4, 2018
b7b2ae2
Rollup merge of #49179 - varkor:future-deprecation, r=QuietMisdreavus…
kennytm Apr 4, 2018
609e9f0
Rollup merge of #49512 - GuillaumeGomez:intra-links-fields, r=QuietMi…
kennytm Apr 4, 2018
fcb17a4
Rollup merge of #49515 - GuillaumeGomez:target-background, r=QuietMis…
kennytm Apr 4, 2018
e0c1803
Rollup merge of #49516 - GuillaumeGomez:add-union-field-missing-ancho…
kennytm Apr 4, 2018
f4f1388
Rollup merge of #49532 - Phlosioneer:32556-rustdoc-regression-test, r…
kennytm Apr 4, 2018
6c8b809
Rollup merge of #49533 - scottmcm:more-must-use, r=nikomatsakis
kennytm Apr 4, 2018
b5ceda8
Rollup merge of #49540 - bjorn3:fix_miri_discriminant, r=oli-obk
kennytm Apr 4, 2018
0cccf81
Rollup merge of #49559 - djc:resize-with, r=TimNN
kennytm Apr 4, 2018
7dad49f
Rollup merge of #49570 - arielb1:bounded-universe, r=nikomatsakis
kennytm Apr 4, 2018
29ab7d8
Rollup merge of #49577 - tmccombs:string-splice-stabilize, r=TimNN
kennytm Apr 4, 2018
e1ebd0a
Rollup merge of #49599 - rolfvandekrol:feature/no_ru, r=frewsxcv
kennytm Apr 4, 2018
52fd162
Rollup merge of #49603 - GuillaumeGomez:fix-intra-link-trait-provided…
kennytm Apr 4, 2018
dd2ec6a
Rollup merge of #49607 - cuviper:stable-iter-1.27, r=alexcrichton
kennytm Apr 4, 2018
b3b7e77
Rollup merge of #49609 - abonander:attr-macro-stmt-expr, r=petrochenkov
kennytm Apr 4, 2018
19c07d3
Rollup merge of #49612 - tmccombs:stabilize-getpid, r=kennytm
kennytm Apr 4, 2018
ce5db0f
Rollup merge of #49618 - pftbest:fix_warning, r=SimonSapin
kennytm Apr 4, 2018
4b6ab5a
Rollup merge of #49619 - durka:patch-46, r=steveklabnik
kennytm Apr 4, 2018
ac4f69b
miri: add public alloc_kind accessor
bjorn3 Apr 3, 2018
a4f744d
Rollup merge of #49637 - tmccombs:parent-id-stabilize, r=sfackler
kennytm Apr 4, 2018
b6b8ed2
Rollup merge of #49639 - matklad:cargo, r=kennytm
kennytm Apr 4, 2018
d6f19b6
Rollup merge of #49628 - steveklabnik:learn-use-master, r=QuietMisdre…
kennytm Apr 4, 2018
93ad4f2
Rollup merge of #49594 - mbrubeck:docs, r=steveklabnik
kennytm Apr 4, 2018
391959f
Rollup merge of #49625 - bjorn3:miri_access_memory_kind, r=oli-obk
kennytm Apr 4, 2018
2025a08
Rollup merge of #49634 - lloydmeta:tests/issue-43058, r=nikomatsakis
kennytm Apr 4, 2018
f29d20e
Rollup merge of #49641 - valff:decl-macro-illegal-copy, r=nikomatsakis
kennytm Apr 4, 2018
00ada06
Rollup merge of #49547 - Phlosioneer:44831-borrowck-remove-ignore, r=…
kennytm Apr 4, 2018
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
38 changes: 38 additions & 0 deletions src/test/ui/nll/issue-43058.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// must-compile-successfully

#![feature(nll)]

use std::borrow::Cow;

#[derive(Clone, Debug)]
struct S<'a> {
name: Cow<'a, str>
}

#[derive(Clone, Debug)]
struct T<'a> {
s: Cow<'a, [S<'a>]>
}

fn main() {
let s1 = [S { name: Cow::Borrowed("Test1") }, S { name: Cow::Borrowed("Test2") }];
let b1 = T { s: Cow::Borrowed(&s1) };
let s2 = [S { name: Cow::Borrowed("Test3") }, S { name: Cow::Borrowed("Test4") }];
let b2 = T { s: Cow::Borrowed(&s2) };

let mut v = Vec::new();
v.push(b1);
v.push(b2);

println!("{:?}", v);
}