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 18 pull requests #58763

Closed
wants to merge 56 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d339468
improve unused doc comment diagnostic reporting
euclio Jan 23, 2019
b5fadf0
expand unused doc comment diagnostic
euclio Jan 24, 2019
890ef48
Fix an indexing error when using `x.py help`
varkor Feb 23, 2019
906ec8a
move collapse and unindent docs passes earlier
euclio Feb 20, 2019
1536852
merge early and late passes into single struct
euclio Feb 23, 2019
8300f51
Deny `async fn` in 2015 edition
doctorn Feb 23, 2019
b7d4f96
rust-lldb: fix crash when printing empty string
euclio Feb 22, 2019
f1b88ab
Fix copy-pasted typo for read_string return value
shepmaster Feb 24, 2019
6c44bbb
Update dlmalloc to 0.1.3
Feb 26, 2019
eddd07c
Make `visit_clobber` panic-safe.
nnethercote Feb 22, 2019
abd88a9
Disable running several Stdio doctests
ipetkov Feb 26, 2019
5b97516
update scoped_tls to 1.0
Feb 26, 2019
992694a
reduce repetitions of (n << amt) >> amt
kenta7777 Feb 26, 2019
b23fd43
Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` const
TimDiekmann Feb 26, 2019
56fb287
update Cargo.lock
hellow554 Feb 26, 2019
2d62619
Add `rustc_const_unstable` attribute
TimDiekmann Feb 26, 2019
4839d8c
Add tests
TimDiekmann Feb 26, 2019
6375efc
Update string_cache_codegen to 0.4.2
taiki-e Feb 26, 2019
278cb91
Satisfy tidy
TimDiekmann Feb 26, 2019
baea3c7
Use `cfg_attr` to prevent duplication
TimDiekmann Feb 26, 2019
c5f3830
Use const eval instead of const fn
TimDiekmann Feb 26, 2019
998896c
Clarify `rotate_{left,right}` docs
tbu- Feb 26, 2019
9b4055b
Normalize the type Self resolves to in an impl
Feb 26, 2019
c1f3d15
Changing error message to reflect changes with the 2018 edition
asettouf Feb 2, 2019
5d8fd8b
Mention `unwind(aborts)` in diagnostics for `#[unwind]`
petrochenkov Feb 26, 2019
6fd716d
Add a test for #10876
varkor Feb 25, 2019
26e5fc3
Add tests for #26448
varkor Feb 25, 2019
d6448a4
Add a test for #26619
varkor Feb 25, 2019
eef9612
Add a test for #44127
varkor Feb 25, 2019
ad6940d
Add a test for #44255
varkor Feb 25, 2019
4e5f780
Add a test for #46101
varkor Feb 25, 2019
d76a632
Add a test for #55731
varkor Feb 25, 2019
0b2f320
Add a test for #57781
varkor Feb 25, 2019
41d4ec6
Add a test for #22892
varkor Feb 25, 2019
caa0799
Add a test for #28587
varkor Feb 25, 2019
16f276b
Add a test for #26577
varkor Feb 25, 2019
79c2788
Add a test for #27054
varkor Feb 25, 2019
5ab5747
Update test for issue #55731
varkor Feb 26, 2019
03ab58d
Rollup merge of #57882 - euclio:unused-doc-attributes, r=estebank
Centril Feb 27, 2019
5418e2a
Rollup merge of #58075 - asettouf:master, r=varkor
Centril Feb 27, 2019
bcc7ec1
Rollup merge of #58627 - euclio:rustdoc-pass-order, r=QuietMisdreavus
Centril Feb 27, 2019
eac298a
Rollup merge of #58629 - euclio:debug-empty-str, r=alexcrichton
Centril Feb 27, 2019
34baa82
Rollup merge of #58630 - nnethercote:fix-fold_clobber, r=petrochenkov
Centril Feb 27, 2019
9c44efd
Rollup merge of #58678 - doctorn:refuse-async-fn-2015-edition, r=varkor
Centril Feb 27, 2019
08e2d0d
Rollup merge of #58680 - varkor:xpy-help-index-error, r=alexcrichton
Centril Feb 27, 2019
11552e4
Rollup merge of #58703 - shepmaster:read_line_return, r=centril
Centril Feb 27, 2019
b6e34a0
Rollup merge of #58743 - varkor:bulk-needstest-1, r=alexcrichton
Centril Feb 27, 2019
372742b
Rollup merge of #58744 - jethrogb:jb/dlmalloc-0.1.3, r=alexcrichton
Centril Feb 27, 2019
86f8f81
Rollup merge of #58746 - ipetkov:std-process-docs, r=cramertj
Centril Feb 27, 2019
0ac99f0
Rollup merge of #58748 - hellow554:scoped_tls, r=estebank
Centril Feb 27, 2019
bd2dab8
Rollup merge of #58749 - kenta7777:reduce-repetition, r=oli-obk
Centril Feb 27, 2019
4253413
Rollup merge of #58750 - TimDiekmann:master, r=oli-obk
Centril Feb 27, 2019
a96150c
Rollup merge of #58752 - taiki-e:update-string_cache_codegen, r=alexc…
Centril Feb 27, 2019
5dacb01
Rollup merge of #58755 - tbu-:pr_doc_clarifyrotate, r=Centril
Centril Feb 27, 2019
6743257
Rollup merge of #58757 - aoikonomopoulos:issue-58212, r=oli-obk
Centril Feb 27, 2019
ae28eec
Rollup merge of #58762 - petrochenkov:unwind, r=Mark-Simulacrum
Centril Feb 27, 2019
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
Prev Previous commit
Next Next commit
Add a test for #26619
  • Loading branch information
varkor committed Feb 26, 2019
commit d6448a45ecbdd4bc8cd43fac5f1e97db40e69280
24 changes: 24 additions & 0 deletions src/test/ui/issues/issue-26619.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#![feature(slice_patterns)]

pub struct History<'a> { pub _s: &'a str }

impl<'a> History<'a> {
pub fn get_page(&self) {
for s in vec!["1|2".to_string()].into_iter().filter_map(|ref line| self.make_entry(line)) {
//~^ ERROR borrowed value does not live long enough
println!("{:?}", s);
}
}

fn make_entry(&self, s: &'a String) -> Option<&str> {
let parts: Vec<_> = s.split('|').collect();
println!("{:?} -> {:?}", s, parts);

if let [commit, ..] = &parts[..] { Some(commit) } else { None }
}
}

fn main() {
let h = History{ _s: "" };
h.get_page();
}
12 changes: 12 additions & 0 deletions src/test/ui/issues/issue-26619.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
error[E0597]: borrowed value does not live long enough
--> $DIR/issue-26619.rs:7:66
|
LL | for s in vec!["1|2".to_string()].into_iter().filter_map(|ref line| self.make_entry(line)) {
| ^^^^^^^^ -- temporary value needs to live until here
| | |
| | temporary value dropped here while still borrowed
| temporary value does not live long enough

error: aborting due to previous error

For more information about this error, try `rustc --explain E0597`.