about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-09-26Rollup merge of #64812 - GuillaumeGomez:add-test-for-e0543, r=CentrilMazdak Farrokhzad-8/+18
Add test for E0543
2019-09-26Rollup merge of #64783 - onehr:onehrxn, r=varkorMazdak Farrokhzad-0/+31
Fix issue #64732 Based on issue #64732, when creating a byte literal with single quotes, the suggestion message would indicate that you meant to write a `str` literal, but we actually meant to write a byte string literal. So I changed the unescape_error_reporting.rs to decide whether to print out "if you meant to write a `str` literal, use double quotes", or "if you meant to write a byte string literal, use double quotes". Fixes #64732.
2019-09-26Rollup merge of #64772 - Mark-Simulacrum:no-tyctxt-tx, r=eddybMazdak Farrokhzad-1/+0
Remove tx_to_llvm_workers from TyCtxt This can be kept within the codegen backend crates entirely -- there's no reason for us to create it outside and attempt to hold it in the (global) context. Changes here aren't really too easily reviewable I suspect -- not sure if they can be cleaned up by splitting into more commits though, it's just hard to reason about `Box<Any>` in general. If there are thoughts though I'd be happy to hear them. The primary goal of this PR is to get rid of the field on `rustc_interface::Queries`.
2019-09-26Rollup merge of #64221 - Centril:nll-no-migrate-2015, r=matthewjasperMazdak Farrokhzad-1329/+172
Rust 2015: No longer downgrade NLL errors As per decision on a language team meeting as described in https://github.com/rust-lang/rust/pull/63565#issuecomment-528563744, in Rust 2015, we refuse to downgrade NLL errors, that AST borrowck accepts, into warnings and keep them as hard errors. The remaining work to throw out AST borrowck and adjust some tests still remains after this PR. Fixes https://github.com/rust-lang/rust/issues/38899 Fixes https://github.com/rust-lang/rust/issues/53432 Fixes https://github.com/rust-lang/rust/issues/45157 Fixes https://github.com/rust-lang/rust/issues/31567 Fixes https://github.com/rust-lang/rust/issues/27868 Fixes https://github.com/rust-lang/rust/issues/47366 r? @matthewjasper
2019-09-26issue-#45696: remove ignore-compare-mode-nllMazdak Farrokhzad-10/+6
2019-09-26Add test for E0543Guillaume Gomez-8/+18
2019-09-26Auto merge of #62661 - arielb1:never-reserve, r=nikomatsakisbors-0/+171
reserve `impl<T> From<!> for T` this is necessary for never-type stabilization. cc #57012 #35121 I think we wanted a crater run for this @nikomatsakis? r? @nikomatsakis
2019-09-26issue-#45696-scribble...: remove outdated comment.Mazdak Farrokhzad-5/+3
2019-09-26rm "src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.migrate.stderr"Mazdak Farrokhzad-36/+0
2019-09-26remove feature(nll) in more cases.Mazdak Farrokhzad-81/+47
2019-09-26remove feature(nll) from #27868 test.Mazdak Farrokhzad-3/+1
2019-09-26remove feature(nll) from #31567 test.Mazdak Farrokhzad-3/+1
2019-09-26remove feature(nll) from #45157 test.Mazdak Farrokhzad-30/+1
2019-09-26add test for #53432.Mazdak Farrokhzad-0/+22
2019-09-26Adjust & --bless tests due to no longer downgrading NLL errors on 2015.Mazdak Farrokhzad-1174/+104
2019-09-26Auto merge of #64513 - varkor:sty-begone, r=eddybbors-8/+8
Rename `TyS.sty` to `TyS.kind` Fixes https://github.com/rust-lang/rust/issues/64353. r? @eddyb
2019-09-25Add test case for issue #64732Haoran Wang-0/+31
2019-09-25Fix format macro expansions spans to be macro-generatedStephen Crane-6/+3
New Exprs generated as part of the format macro expansion should get the macro expansion span which has an expansion context, not the span of the format string which does not.
2019-09-25Fix falloutvarkor-2/+2
2019-09-25Remove tx_to_llvm_workers from TyCtxtMark Rousskov-1/+0
This can be kept within the codegen backend crates entirely
2019-09-25address rebase damageAriel Ben-Yehuda-2/+2
2019-09-25Rename surviving uses of `sty`varkor-6/+6
2019-09-25update ui testsGuillaume Gomez-4/+9
2019-09-25Rollup merge of #64738 - gnzlbg:miri_norm_abi, r=oli-obkMazdak Farrokhzad-0/+53
Add const-eval support for SIMD types, insert, and extract This adds initial support for constant-evaluation of Abi::Vector types. r? @oli-obk
2019-09-25Rollup merge of #64508 - Centril:or-pat-hir, r=matthewjasperMazdak Farrokhzad-10/+13
or-patterns: Push `PatKind/PatternKind::Or` at top level to HIR & HAIR Following up on work in https://github.com/rust-lang/rust/pull/64111, https://github.com/rust-lang/rust/pull/63693, and https://github.com/rust-lang/rust/pull/61708, in this PR: - We change `hair::Arm.patterns: Vec<Pattern<'_>>` into `hir::Arm.pattern: Pattern<'_>`. - `fn hair::Arm::top_pats_hack` is introduced as a temporary crutch in MIR building to avoid more changes. - We change `hir::Arm.pats: HirVec<P<Pat>>` into `hir::Arm.pat: P<Pat>`. - The hacks in `rustc::hir::lowering` are removed since the representation hack is no longer necessary. - In some places, `fn hir::Arm::top_pats_hack` is introduced to leave some things as future work. - Misc changes: HIR pretty printing is adjusted to behave uniformly wrt. top/inner levels, rvalue promotion is adjusted, regionck, and dead_code is also. - Type checking is adjusted to uniformly handle or-patterns at top/inner levels. To make things compile, `p_0 | ... | p_n` is redefined as a "reference pattern" in [`fn is_non_ref_pat`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/struct.FnCtxt.html#method.is_non_ref_pat) for now. This is done so that reference types are not eagerly stripped from the `expected: Ty<'tcx>`. - Liveness is adjusted wrt. the `unused_variables` and `unused_assignments` lints to handle top/inner levels uniformly and the handling of `fn` parameters, `let` locals, and `match` arms are unified in this respect. This is not tested for now as exhaustiveness checks are reachable and will ICE. - In `check_match`, checking `@` and by-move bindings is adjusted. However, exhaustiveness checking is not adjusted the moment and is handled by @dlrobertson in https://github.com/rust-lang/rust/pull/63688. - AST borrowck (`construct.rs`) is not adjusted as AST borrowck will be removed soon. r? @matthewjasper cc @dlrobertson @varkor @oli-obk
2019-09-25Remove fail testsgnzlbg-201/+0
2019-09-25Clean testsgnzlbg-11/+31
2019-09-25Test errorsgnzlbg-60/+181
2019-09-25Update ui testsGuillaume Gomez-3/+30
2019-09-25Refactorgnzlbg-0/+24
2019-09-25Allow simd_insert and simd_extract in const_fngnzlbg-290/+2
2019-09-25Rollup merge of #64753 - ehuss:json-short-explain, r=Mark-SimulacrumMazdak Farrokhzad-2/+0
Don't emit explain with json short messages. This fixes an issue where `--error-format=json --json=diagnostic-short` would emit the "For more information about this error" message, which doesn't match the behavior of `--error-format=short` which explicitly excludes it.
2019-09-25Rollup merge of #64746 - estebank:elide-impl-trait-obligations-on-err, ↵Mazdak Farrokhzad-107/+173
r=cramertj Remove blanket silencing of "type annotation needed" errors Remove blanket check for existence of other errors before emitting "type annotation needed" errors, and add some eager checks to avoid adding obligations when they refer to types that reference `[type error]` in order to reduce unneeded errors. Fix #64084.
2019-09-25Rollup merge of #64599 - csmoe:doc_async_reexport, r=nikomatsakisMazdak Farrokhzad-1/+19
Rustdoc render async function re-export Closes #63710 r? @nikomatsakis
2019-09-25Rollup merge of #64428 - GuillaumeGomez:error-explanation-E0524, r=CentrilMazdak Farrokhzad-10/+9
Error explanation e0524 Part of https://github.com/rust-lang/rust/issues/61137
2019-09-25Rollup merge of #64324 - alexcrichton:share-generics-again, r=michaelwoeristerMazdak Farrokhzad-8/+61
rustc: Fix mixing crates with different `share_generics` This commit addresses #64319 by removing the `dylib` crate type from the list of crate type that exports generic symbols. The bug in #64319 arises because a `dylib` crate type was trying to export a symbol in an uptream crate but it miscalculated the symbol name of the uptream symbol. This isn't really necessary, though, since `dylib` crates aren't that heavily used, so we can just conservatively say that the `dylib` crate type never exports generic symbols, forcibly removing them from the exported symbol lists if were to otherwise find them. The fix here happens in two places: * First is in the `local_crate_exports_generics` method, indicating that it's now `false` for the `Dylib` crate type. Only rlibs actually export generics at this point. * Next is when we load exported symbols from upstream crate. If, for our compilation session, the crate may be included from a dynamic library, then its generic symbols are removed. When the crate was linked into a dynamic library its symbols weren't exported, so we can't consider them a candidate to link against. Overally this should avoid situations where we incorrectly calculate the upstream symbol names in the face of differnet `share_generics` options, ultimately... Closes #64319
2019-09-24Don't emit explain with json short messages.Eric Huss-2/+0
2019-09-24More path name fixesGeorg Semmler-2/+2
2019-09-24Rollup merge of #64748 - Centril:fix-64744, r=estebankMazdak Farrokhzad-2/+16
Fix #64744. Account for the Zero sub-pattern case. Fixes https://github.com/rust-lang/rust/issues/64744. r? @estebank
2019-09-24Rollup merge of #64698 - Centril:infer-const-with-stash, r=estebankMazdak Farrokhzad-0/+84
Recover on `const X = 42;` and infer type + Error Stash API Here we: 1. Introduce a notion of the "error stash". This is a map in the `Handler` to which you can `err.stash(...)` away your diagnostics and then steal them in a later "phase" of the compiler (e.g. stash in parser, steal in typeck) to enrich them with more information that isn't available in the previous "phase". I believe I've covered all the bases to make sure these diagnostics are actually emitted eventually even under `#[cfg(FALSE)]` but please check my logic. 2. Recover when parsing `[const | static mut?] $ident = $expr;` which has a missing type. Use the "error stash" to stash away the error and later steal the error in typeck where we emit the error as `MachineApplicable` with the actual inferred type. This builds on https://github.com/rust-lang/rust/pull/62804. cc https://github.com/rust-lang/rfcs/pull/2545 r? @estebank
2019-09-24Rollup merge of #64016 - nnethercote:Compiler-fiddling, r=oli-obkMazdak Farrokhzad-1/+2
Streamline `Compiler` A few commits to clean up `Compiler`. r? @Zoxc
2019-09-24Fix #64744 -- handle zero sub-pats case.Mazdak Farrokhzad-2/+16
2019-09-24Add additional tests for type alias impl trait coherenceAaron Hill-0/+71
2019-09-24fix rebaseEsteban Küber-1/+1
2019-09-24Remove blanket silencing of "type annotation needed" errorsEsteban Küber-107/+173
Remove blanket check for existence of other errors before emitting "type annotation needed" errors, and add some eager checks to avoid adding obligations when they refer to types that reference `[type error]` in order to reduce unneded errors.
2019-09-24nit: update error text to cite tracking issueNiko Matsakis-1/+1
2019-09-24nit: update text to avoid "lattice specialization" termNiko Matsakis-5/+8
2019-09-24improve commentAriel Ben-Yehuda-4/+4
2019-09-24add test for lattice specializationAriel Ben-Yehuda-0/+56
2019-09-24add error message for caseAriel Ben-Yehuda-3/+7