summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2018-04-30Improve div by zero const eval errorsOliver Schneider-2/+1
2018-04-30Update ui test outputOliver Schneider-1/+1
2018-04-27Allow #[inline] on closuresAmanieu d'Antras-4/+4
Fixes #49632
2018-04-18Trivial updates to `.nll.stderr` files post-rebase, reflecting s/-Znll/nll/ ↵Felix S. Klock II-1/+1
in messages.
2018-04-18Update the previously checkpointed (but unused by bors) tests to reflect ↵Felix S. Klock II-4/+4
current reality.
2018-04-12AST/HIR: Merge field access expressions for named and numeric fieldsVadim Petrochenkov-22/+22
2018-04-11Checkpoint the current status of NLL on `ui` tests via compare-mode=nll.Felix S. Klock II-0/+184
2018-04-11Workaround rust-lang/rust#49855 by forcing rustc_error in any mode, ↵Felix S. Klock II-10/+10
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-04-04Auto merge of #48171 - FraGag:doc-copy-clone-impls, r=nikomatsakisbors-4/+4
Better document the implementors of Clone and Copy There are two parts to this change. The first part is a change to the compiler and to the standard library (specifically, libcore) to allow implementations of `Clone` and `Copy` to be written for a subset of builtin types. By adding these implementations to libcore, they now show up in the documentation. This is a [breaking-change] for users of `#![no_core]`, because they will now have to supply their own copy of the implementations of `Clone` and `Copy` that were added in libcore. The second part is purely a documentation change to document the other implementors of `Clone` and `Copy` that cannot be described in Rust code (yet) and are thus provided by the compiler. Fixes #25893
2018-03-29Stabilize underscore lifetimesTaylor Cramer-4/+3
2018-03-28Stabilize match_default_bindingsTaylor Cramer-24/+4
This includes a submodule update to rustfmt in order to allow a stable feature declaration.
2018-03-26Move some implementations of Clone and Copy to libcoreFrancis Gagné-4/+4
Add implementations of `Clone` and `Copy` for some primitive types to libcore so that they show up in the documentation. The concerned types are the following: * All primitive signed and unsigned integer types (`usize`, `u8`, `u16`, `u32`, `u64`, `u128`, `isize`, `i8`, `i16`, `i32`, `i64`, `i128`); * All primitive floating point types (`f32`, `f64`) * `bool` * `char` * `!` * Raw pointers (`*const T` and `*mut T`) * Shared references (`&'a T`) These types already implemented `Clone` and `Copy`, but the implementation was provided by the compiler. The compiler no longer provides these implementations and instead tries to look them up as normal trait implementations. The goal of this change is to make the implementations appear in the generated documentation. For `Copy` specifically, the compiler would reject an attempt to write an `impl` for the primitive types listed above with error `E0206`; this error no longer occurs for these types, but it will still occur for the other types that used to raise that error. The trait implementations are guarded with `#[cfg(not(stage0))]` because they are invalid according to the stage0 compiler. When the stage0 compiler is updated to a revision that includes this change, the attribute will have to be removed, otherwise the stage0 build will fail because the types mentioned above no longer implement `Clone` or `Copy`. For type variants that are variadic, such as tuples and function pointers, and for array types, the `Clone` and `Copy` implementations are still provided by the compiler, because the language is not expressive enough yet to be able to write the appropriate implementations in Rust. The initial plan was to add `impl` blocks guarded by `#[cfg(dox)]` to make them apply only when generating documentation, without having to touch the compiler. However, rustdoc's usage of the compiler still rejected those `impl` blocks. This is a [breaking-change] for users of `#![no_core]`, because they will now have to supply their own implementations of `Clone` and `Copy` for the primitive types listed above. The easiest way to do that is to simply copy the implementations from `src/libcore/clone.rs` and `src/libcore/marker.rs`. Fixes #25893
2018-03-26Fix e0658 ui testMark Mansi-7/+12
2018-03-26Stabilize i128 feature tooMark Mansi-1/+1
2018-03-26Stabilize conservative_impl_traitTaylor Cramer-3/+2
2018-03-25Rollup merge of #49046 - Zoxc:error-summary, r=michaelwoeristerkennytm-2/+4
Always print `aborting due to n previous error(s)` r? @michaelwoerister
2018-03-23Rollup merge of #49160 - estebank:issue-47457-missing-fields, r=oli-obkAlex Crichton-2/+2
Reduce the diagnostic spam when multiple fields are missing in pattern Fix #47457.
2018-03-20Auto merge of #49190 - kennytm:rollup, r=kennytmbors-3/+3
Rollup of 17 pull requests - Successful merges: #46518, #48810, #48834, #48902, #49004, #49092, #49096, #49099, #49104, #49125, #49139, #49152, #49157, #49161, #49166, #49176, #49184 - Failed merges:
2018-03-19Reduce diagnostic verbosity by removing labelsEsteban Küber-2/+2
2018-03-20Stabilize slice patterns without `..`Vadim Petrochenkov-6/+2
Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`
2018-03-19#49133 - Reworded the Error message: "`pub` not needed here" messageDileep Bapat-3/+3
2018-03-16Update testsJohn Kåre Alsaker-2/+4
2018-03-16Rollup merge of #49037 - estebank:coherence-tweaks, r=nikomatsakiskennytm-2/+31
Coherence diagnostic tweaks
2018-03-16Rollup merge of #49007 - estebank:follow-up-47574, r=oli-obkkennytm-8/+9
Some tweaks to "type parameters from outer function" diagnostic Follow up to #47574.
2018-03-15Coherence diagnostic tweaksEsteban Küber-2/+31
2018-03-16Rollup merge of #48706 - ehuss:main-not-found-in-crate, r=estebankkennytm-5/+22
Add crate name to "main function not found" error message. Fixes #44798 and rust-lang/cargo#4948. I was wondering if it might be cleaner to update the ui tests to add a simple `fn main() {}` for the unrelated tests. Let me know if you would prefer that.
2018-03-15Auto merge of #48138 - estebank:issue-45092, r=nikomatsakisbors-10/+11
Reword E0044 and message for `!Send` types - Reword E0044 help. - Change error message for types that don't implement `Send` CC #45092, #46678, #24909, #33307.
2018-03-14Add span label to E0044Esteban Küber-1/+2
2018-03-14Reword E0044 and message for `!Send` typesEsteban Küber-10/+10
- Reword E0044 help. - Change error message for types that don't implement `Send`
2018-03-14Update E0601 test for new message format.Eric Huss-1/+1
2018-03-14Some tweaks to "type parameters from outer function" diagnosticEsteban Küber-8/+9
Follow up to #47574.
2018-03-14Add backticks to `main` not found errors.Eric Huss-2/+2
2018-03-14Add suggestion where to add main function.Eric Huss-0/+18
2018-03-14Add empty main() to tests where it is missing.Eric Huss-5/+4
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-256/+254
2018-03-10Auto merge of #47574 - zilbuz:issue-14844, r=nikomatsakisbors-6/+54
Show the used type variable when issuing a "can't use type parameters from outer function" error message Fix #14844 r? @estebank
2018-03-08Update testsBasile Desloges-6/+54
2018-03-08Unify the const folding errorsOliver Schneider-7/+6
before they differed depending on whether optimizations were on or not
2018-03-08Regenerate testsOliver Schneider-14/+22
2018-03-08Rebase falloutOliver Schneider-1/+1
2018-03-08Update testsOliver Schneider-0/+1
2018-03-08Adjust tests to more aggressive const err lintingOliver Schneider-0/+2
2018-03-08Reduce noise in error reportingOliver Schneider-1/+1
2018-03-08Fully use miri in transOliver Schneider-3/+4
2018-02-28Remove E0245; improve E0404 explanationMark Mansi-2/+9
2018-02-26Fix rebaseVadim Petrochenkov-7/+7
2018-02-26Update UI testsVadim Petrochenkov-15/+15
2018-02-26Update UI testsVadim Petrochenkov-396/+396
2018-02-26Auto merge of #48337 - GuillaumeGomez:rustc-explain, r=estebankbors-0/+256
Rustc explain Fixes #48041. To make the review easier, I separated tests update to code update. Also, I used this script to generate new ui tests stderr: ```python from os import listdir from os.path import isdir, isfile, join PATH = "src/test/ui" def do_something(path): files = [join(path, f) for f in listdir(path)] for f in files: if isdir(f): do_something(f) continue if not isfile(f) or not f.endswith(".stderr"): continue x = open(f, "r") content = x.read().strip() if "error[E" not in content: continue errors = dict() for y in content.splitlines(): if y.startswith("error[E"): errors[y[6:11]] = True errors = sorted(errors.keys()) if len(errors) < 1: print("weird... {}".format(f)) continue if len(errors) > 1: content += "\n\nYou've got a few errors: {}".format(", ".join(errors)) content += "\nIf you want more information on an error, try using \"rustc --explain {}\"".format(errors[0]) else: content += "\n\nIf you want more information on this error, try using \"rustc --explain {}\"".format(errors[0]) content += "\n" x = open(f, "w") x.write(content) do_something(PATH) ```