about summary refs log tree commit diff
path: root/src/test/ui/codemap_tests
AgeCommit message (Collapse)AuthorLines
2019-04-22update tests for migrate mode by defaultMatthew Jasper-70/+18
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-4/+1
2019-03-11Update NLL testsVadim Petrochenkov-4/+4
2019-03-11Update testsVadim Petrochenkov-20/+20
2019-01-24Fix --compare-mode=nll testsEsteban Küber-2/+2
2018-12-25Remove licensesMark Rousskov-271/+26
2018-11-05Removed overlapping_spans.{rs,stderr,nll.stderr}.Felix S. Klock II-52/+0
This is based on the feedback from estebank: """ I believe that test can be removed outright. It'd be impossible for a new change to go through that breaks this kind of output without it being picked up by multiple other `stderr` tests. This is an artifact of the transition period to the "new" output style. """ see: https://github.com/rust-lang/rust/issues/52663#issuecomment-422155551
2018-11-03Added tests.Alexander Regueiro-1/+3
2018-10-03Clearer later use messages for callsMatthew Jasper-5/+4
Give a special message when the later use is from a call. Use the span of the callee instead of the whole expression. For conflicting borrow messages say that the later use is of the first borrow.
2018-09-12use structured suggestion for "missing mut" labelAndy Russell-1/+1
Fixes #54133.
2018-08-15Bless UI testsashtneoi-4/+7
2018-08-06Point at correct span when missing comma in `println`Esteban Küber-8/+4
2018-07-31NLL: On "cannot move out of type" error, print original source before rewrite.Felix S. Klock II-1/+4
* Arguably this change is sometimes injecting noise into the output (namely in the cases where the suggested rewrite is inline with the suggestion and we end up highlighting the original source code). I would not be opposed to something more aggressive/dynamic, like revising the suggestion code to automatically print the original source when necessary (e.g. when the error does not have a span that includes the span of the suggestion). * Also, as another note on this change: The doc comment for `Diagnostic::span_suggestion` says: /// The message /// /// * should not end in any punctuation (a `:` is added automatically) /// * should not be a question /// * should not contain any parts like "the following", "as shown" but the `:` is *not* added when the emitted line appears out-of-line relative to the suggestion. I find that to be an unfortunate UI experience. ---- As a drive-by fix, also changed code to combine multiple suggestions for a pattern into a single multipart suggestion (which vastly improves user experience IMO). ---- Includes the updates to expected NLL diagnostics.
2018-07-23Match errors using the callsite of macro expansionsFederico Poli-6/+6
2018-07-20Update tests for new NLL mutability errorsMatthew Jasper-1/+1
2018-07-13Add the `amdgpu-kernel` ABI.Richard Diamond-1/+1
Technically, there are requirements imposed by the LLVM `AMDGPUTargetMachine` on functions with this ABI (eg, the return type must be void), but I'm unsure exactly where this should be enforced.
2018-06-27Update tests for grouped nll move errorsMatthew Jasper-2/+4
2018-06-22Auto merge of #51463 - estebank:error-codes, r=nikomatsakisbors-2/+5
Various changes to existing diagnostics * [Add code to `invalid ABI` error, add span label, move list to help to make message shorter](https://github.com/rust-lang/rust/pull/51463/commits/23ae5af274defa9ff884f593e44a2bbcaf814a02): ``` error[E0697]: invalid ABI: found `路濫狼á́́` --> $DIR/unicode.rs:11:8 | LL | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI | ^^^^^^^^^ invalid ABI | = help: valid ABIs: cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted ``` * [Add code to incorrect `pub` restriction error](https://github.com/rust-lang/rust/pull/51463/commits/e96fdea8a38f39f99f8b9a4000a689187a457e08) * [Add message to `rustc_on_unimplemented` attributes in core to have them set a custom message _and_ label](https://github.com/rust-lang/rust/pull/51463/commits/2cc7e5ed307aee936c20479cfdc7409d6b52a464): ``` error[E0277]: `W` does not have a constant size known at compile-time --> $DIR/unsized-enum2.rs:33:8 | LL | VA(W), | ^ `W` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `W` = help: consider adding a `where W: std::marker::Sized` bound = note: no field of an enum variant may have a dynamically sized type ``` ``` error[E0277]: `Foo` cannot be sent between threads safely --> $DIR/E0277-2.rs:26:5 | LL | is_send::<Foo>(); | ^^^^^^^^^^^^^^ `Foo` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `Foo` ``` ``` error[E0277]: can't compare `{integer}` with `std::string::String` --> $DIR/binops.rs:16:7 | LL | 5 < String::new(); | ^ no implementation for `{integer} < std::string::String` and `{integer} > std::string::String` | = help: the trait `std::cmp::PartialOrd<std::string::String>` is not implemented for `{integer}` ``` ``` error[E0277]: can't compare `{integer}` with `std::result::Result<{integer}, _>` --> $DIR/binops.rs:17:7 | LL | 6 == Ok(1); | ^^ no implementation for `{integer} == std::result::Result<{integer}, _>` | = help: the trait `std::cmp::PartialEq<std::result::Result<{integer}, _>>` is not implemented for `{integer}` ``` ``` error[E0277]: a collection of type `i32` cannot be built from an iterator over elements of type `i32` --> $DIR/type-check-defaults.rs:16:19 | LL | struct WellFormed<Z = Foo<i32, i32>>(Z); | ^ a collection of type `i32` cannot be built from `std::iter::Iterator<Item=i32>` | = help: the trait `std::iter::FromIterator<i32>` is not implemented for `i32` note: required by `Foo` --> $DIR/type-check-defaults.rs:15:1 | LL | struct Foo<T, U: FromIterator<T>>(T, U); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` * [Add link to book for `Sized` errors](https://github.com/rust-lang/rust/pull/51463/commits/1244dc7c283323aea1a3457a4458d590a3e160c8): ``` error[E0277]: `std::fmt::Debug + std::marker::Sync + 'static` does not have a constant size known at compile-time --> $DIR/const-unsized.rs:13:29 | LL | const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync)); | ^^^^^^^^^^^^^^^^^^^^^^ `std::fmt::Debug + std::marker::Sync + 'static` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `std::fmt::Debug + std::marker::Sync + 'static` = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized> = note: constant expressions must have a statically known size ``` * [Point to previous line for single expected token not found](https://github.com/rust-lang/rust/pull/51463/commits/48165168fb0f059d8536cd4a2276b609d4a7f721) (if the current token is in a different line)
2018-06-19Update error code numbersEsteban Küber-2/+2
2018-06-19Add code to `invalid ABI` errorEsteban Küber-2/+5
2018-06-19NLL: Updates to diagnostic output in `test/ui`.Felix S. Klock II-0/+3
2018-05-25rust-lang/rust#51025: improve test robustness so that they work under NLL too.Felix S. Klock II-8/+16
2018-05-11unary op filter, dereference hintRoman Stoliar-3/+1
2018-05-11added missing implementation hintRoman Stoliar-0/+2
2018-04-13Rename must-compile-successfully into compile-passGuillaume Gomez-1/+1
2018-04-11Checkpoint the current status of NLL on `ui` tests via compare-mode=nll.Felix S. Klock II-0/+57
2018-04-11Workaround rust-lang/rust#49855 by forcing rustc_error in any mode, ↵Felix S. Klock II-2/+2
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 #49046 - Zoxc:error-summary, r=michaelwoeristerkennytm-1/+2
Always print `aborting due to n previous error(s)` r? @michaelwoerister
2018-03-16Update testsJohn Kåre Alsaker-1/+2
2018-03-16Auto merge of #48813 - sinkuu:build_in_assert_macro, r=alexcrichtonbors-2/+1
Make `assert` a built-in procedural macro Makes `assert` macro a built-in one without touching its functionality. This is a prerequisite for RFC 2011 (#44838).
2018-03-16Rollup merge of #49037 - estebank:coherence-tweaks, r=nikomatsakiskennytm-1/+1
Coherence diagnostic tweaks
2018-03-15Coherence diagnostic tweaksEsteban Küber-1/+1
2018-03-14update testsGuillaume Gomez-13/+12
2018-03-08Fix testShotaro Yamada-2/+1
2018-02-26Update UI testsVadim Petrochenkov-1/+1
2018-02-26Update UI testsVadim Petrochenkov-42/+42
2018-02-25Update ui testsGuillaume Gomez-0/+13
2017-12-19Point at `while true` span instead of entire blockEsteban Küber-3/+1
2017-12-11Auto merge of #46608 - estebank:resolve-return, r=nikomatsakisbors-1/+1
Resolve type on return type suggestion Partially address #45871.
2017-12-10Update ui tests' line numbers.Tommy Ip-2/+2
2017-12-10Add must-compile-successfully comment to appropriate ui tests.Tommy Ip-0/+2
2017-12-09Resolve type on return type suggestionEsteban Küber-1/+1
2017-12-06Auto merge of #45953 - estebank:tab-4, r=nikomatsakisbors-11/+11
Display `\t` in diagnostics code as four spaces Follow up to #44386 using the unicode variable width machinery from #45711 to replace tabs in the source code when displaying a diagnostic error with four spaces (instead of only one), while properly accounting for this when calculating underlines. Partly addresses #44618.
2017-11-26mention nightly in -Z external-macro-backtrace noteAlex Burka-4/+4
2017-11-24Display `\t` in diagnostics code as four spacesEsteban Küber-11/+11
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-36/+36
2017-11-20address review commentsAlex Burka-4/+4
2017-11-19use -Z flag instead of env varAlex Burka-4/+4
2017-11-19update UI testsAlex Burka-4/+4
2017-11-03Display spans correctly when there are non-half-width charactersWonwoo Choi-1/+66