summary refs log tree commit diff
path: root/src/test/ui/span
AgeCommit message (Collapse)AuthorLines
2018-07-26Use better spans for dummy accesses used in matchesMatthew Jasper-5/+5
2018-07-26Rollup merge of #52617 - matthewjasper:remove-unused-code, r=nikomatsakisMark Rousskov-51/+51
Don't match on region kinds when reporting NLL errors First half (by number of tests affected) of the changes to "does not live long enough". Now that lexical MIR borrowck is gone, region kinds are always ReVar, so matching on them to change errors does nothing. Changes "borrowed value only lives until here" to "`x` is dropped here while still borrowed". r? @pnkfelix cc @nikomatsakis
2018-07-24Rollup merge of #52605 - estebank:str-plus-eq, r=oli-obkkennytm-6/+2
Do not suggest using `to_owned()` on `&str += &str` - Don't provide incorrect suggestion for `&str += &str` (fix #52410) - On `&str + String` suggest `&str.to_owned() + &String` as a single suggestion
2018-07-23Don't match on region kinds when reporting NLL errorsMatthew Jasper-51/+51
With NLL region kinds are always ReVar
2018-07-23Match errors using the callsite of macro expansionsFederico Poli-2/+5
2018-07-22Rollup merge of #52507 - estebank:infer-type, r=nikomatsakiskennytm-3/+3
Reword when `_` couldn't be inferred r? @nikomatsakis
2018-07-21Do not suggest using `to_owned()` on `&str += &str`Esteban Küber-6/+2
2018-07-21Add specific message when moving from upvars in a non-FnOnce closureMatthew Jasper-2/+2
2018-07-20Update tests for new NLL mutability errorsMatthew Jasper-21/+21
2018-07-20Reword when `_` couldn't be inferredEsteban Küber-3/+3
2018-07-06Rollup merge of #52067 - csmoe:issue-51167, r=nikomatsakisMark Rousskov-28/+28
Visit the mir basic blocks in reverse-postfix order cc #51167 r? @nikomatsakis
2018-07-05update testcsmoe-28/+28
2018-07-01Make causal tracking lazySantiago Pastorino-22/+6
2018-06-23add `dyn` to display of dynamic (trait) type namesZack M. Davis-1/+1
The `dyn Trait` syntax was stabilized in 199ee327. Resolves #49277.
2018-06-19Suggest that values are dropped in the opposite order they are definedSantiago Pastorino-0/+36
2018-06-19NLL: Updates to diagnostic output in `test/ui`.Felix S. Klock II-18/+59
2018-05-29Fix typoEsteban Küber-1/+1
2018-05-28Add primary span labelEsteban Küber-3/+4
2018-05-28Only suggest assoc fn when sure about the typeEsteban Küber-6/+2
2018-05-27Use suggestion for assoc fn called like methodEsteban Küber-8/+11
When encountering an unexisting method for a given trait where an associated function has the same name, suggest using the appropriate syntax, instead of using `help` text. When only one candidate is found, do not call it "candidate #1", just call it "the candidate".
2018-05-25rust-lang/rust#51025: improve test robustness so that they work under NLL too.Felix S. Klock II-110/+233
2018-05-13Improve eager type resolution error messageleonardo.yvens-0/+52
This PR improves the span of eager resolution type errors referring to indexing and field access to use the base span rather than the whole expression. Also a note "Type must be known at this point." is added to where we at some point in the past emitted the "type must be known at this context" error, so that early failures can be differentiated and will hopefully be less surprising. Fixes #50692 (or at least does the best we can for the moment) r? @estebank
2018-05-10Fix tuple struct field spansEsteban Küber-1/+1
2018-04-28stabilize `#[must_use]` for functions and must-use operatorsZack M. Davis-40/+1
This is in the matter of RFC 1940 and tracking issue #43302.
2018-04-18Workaround rust-lang/rust#49998 by opting into experimental `-Z ↵Felix S. Klock II-9/+12
nll-subminimal-causes` flag This commit only applies the flag to the one test case, ui/span/dropck_vec_cycle_checked.rs, that absolutely needs it. Without the flag, that test takes an unknown amount of time (greater than 1 minute) to compile. But its possible that other tests would also benefit from the flag, and we may want to make it the default (after evaluating its impact on other tests). In terms of its known impact on other tests, I have only evaluated the ui tests, and the *only* ui test I have found that the flag impacts (running under NLL mode, of course), is src/test/ui/nll/issue-31567.rs In particular: ``` % ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/nll/issue-31567.rs error[E0597]: `*v.0` does not live long enough --> ../src/test/ui/nll/issue-31567.rs:22:26 | 22 | let s_inner: &'a S = &*v.0; //~ ERROR `*v.0` does not live long enough | ^^^^^ borrowed value does not live long enough 23 | &s_inner.0 24 | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 21:1... --> ../src/test/ui/nll/issue-31567.rs:21:1 | 21 | fn get_dangling<'a>(v: VecWrapper<'a>) -> &'a u32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0597`. % ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/nll/issue-31567.rs -Z nll-subminimal-causes error[E0597]: `*v.0` does not live long enough --> ../src/test/ui/nll/issue-31567.rs:22:26 | 22 | let s_inner: &'a S = &*v.0; //~ ERROR `*v.0` does not live long enough | ^^^^^ borrowed value does not live long enough 23 | &s_inner.0 24 | } | - | | | borrowed value only lives until here | borrow later used here, when `v` is dropped error: aborting due to previous error For more information about this error, try `rustc --explain E0597`. % ```
2018-04-18Update the previously checkpointed (but unused by bors) tests to reflect ↵Felix S. Klock II-14/+60
current reality.
2018-04-13Rename must-compile-successfully into compile-passGuillaume Gomez-2/+2
2018-04-11Checkpoint the current status of NLL on `ui` tests via compare-mode=nll.Felix S. Klock II-0/+923
2018-04-11Workaround rust-lang/rust#49855 by forcing rustc_error in any mode, ↵Felix S. Klock II-16/+16
including NLL. NOTE: I was careful to make each change in a manner that preserves the existing diagnostic output (usually by ensuring that no lines were added or removed). This means that the resulting source files are not as nice to read as they were at the start. But we will have to review these cases by hand anyway as follow-up work, so cleanup could reasonably happen then (or not at all).
2018-03-25Rollup merge of #49299 - SimonSapin:ubiquity, r=nikomatsakiskennytm-5/+8
Stabilize the copy_closures and clone_closures features In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do. Tracking issue: https://github.com/rust-lang/rust/issues/44490
2018-03-23Stabilize the copy_closures and clone_closures featuresSimon Sapin-5/+8
In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do.
2018-03-16Update testsJohn Kåre Alsaker-1/+4
2018-03-16Rollup merge of #49042 - kennytm:fix-e0307-typo, r=rkruppekennytm-1/+1
Remove unnecessary "`" in error message E0307 (invalid self type).
2018-03-15Remove unnecessary "`" in error message E0307 (invalid self type).kennytm-1/+1
2018-03-14Add empty main() to tests where it is missing.Eric Huss-2/+2
2018-03-14Add crate name to "main function not found" error message.Eric Huss-1/+1
Fixes #44798 and rust-lang/cargo#4948.
2018-03-14update testsGuillaume Gomez-87/+85
2018-03-09tidy: Add a check for stray `.stderr` and `.stdout` files in UI test directoriesVadim Petrochenkov-14/+0
2018-02-26Fix rebaseVadim Petrochenkov-3/+3
2018-02-26Update UI testsVadim Petrochenkov-36/+36
2018-02-26Update UI testsVadim Petrochenkov-511/+511
2018-02-25Reduce error codes length when too much are thrownGuillaume Gomez-1/+1
2018-02-25Update ui testsGuillaume Gomez-0/+88
2018-02-24Rollup merge of #48392 - estebank:string, r=petrochenkovManish Goregaokar-1/+18
Handle custom diagnostic for `&str + String` Now all of `&str + &str`, `&str + String` and `String + String` have relevant diagnostic output.
2018-02-20Handle custom diagnostic for `&str + String`Esteban Küber-1/+18
2018-02-17fix stderrcsmoe-2/+4
2018-02-14inform type annotationscsmoe-5/+5
2018-02-07Rollup merge of #48028 - zackmdavis:and_the_span_of_the_unknown_type, r=estebankManish Goregaokar-0/+42
correct E0619 span re method call receivers whose type must be known Previously, when the type of a method receiver could not be determined, the error message would, potentially confusingly, highlight the span of the entire method call. ![unknown_receiver_type](https://user-images.githubusercontent.com/1076988/35838930-a595b17c-0aa2-11e8-9364-6b8e2329f051.png) Resolves #36598, resolves #42234.
2018-02-07Rollup merge of #47922 - ↵Manish Goregaokar-2/+1
zackmdavis:and_the_case_of_the_unused_field_pattern, r=estebank correct unused field pattern suggestions ![unused_field_pattern_local](https://user-images.githubusercontent.com/1076988/35662336-7a69488a-06cc-11e8-9901-8d22b5cf924f.png) r? @estebank
2018-02-07Rollup merge of #47613 - estebank:rustc_on_unimplemented, r=nikomatsakisManish Goregaokar-3/+3
Add filtering options to `rustc_on_unimplemented` - Add filtering options to `rustc_on_unimplemented` for local traits, filtering on `Self` and type arguments. - Add a way to provide custom notes. - Tweak binops text. - Add filter to detect wether `Self` is local or belongs to another crate. - Add filter to `Iterator` diagnostic for `&str`. Partly addresses #44755 with a different syntax, as a first approach. Fixes #46216, fixes #37522, CC #34297, #46806.