summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2020-05-22Fix E0284 to not use incorrect wordingEsteban Küber-4/+96
Fix #71584, fix #69683. (cherry picked from commit a7b03ad4eddb65abede497dbc408244f23c36256)
2020-05-09fix error code for E0751YI-3/+3
2020-04-18Add label to item source of bound obligationEsteban Küber-8/+8
2020-04-18Do not emit note for projected derived obligationsEsteban Küber-4/+0
2020-04-18Remove `AssocTypeBound` and propagate bound `Span`sEsteban Küber-12/+9
2020-04-18Maintain chain of derived obligationsEsteban Küber-0/+5
When evaluating the derived obligations from super traits, maintain a reference to the original obligation in order to give more actionable context in the output.
2020-04-16ty: convert `ErrorHandled::Reported` to `ConstKind::Error`.Eduard-Mihai Burtescu-64/+11
2020-04-14typeck: always expose repeat count `AnonConst`s' parent in `generics_of`.Eduard-Mihai Burtescu-5/+7
2020-04-14typeck: workaround WF hole in `to_const`.Eduard-Mihai Burtescu-1/+10
2020-04-14typeck: track any errors injected during writeback and taint tables ↵Eduard-Mihai Burtescu-2/+54
appropriately.
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-5/+5
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-13Auto merge of #71105 - Dylan-DPC:rollup-nezezxr, r=Dylan-DPCbors-1/+1
Rollup of 5 pull requests Successful merges: - #70656 (Improve scrollbar display in rustdoc) - #71051 (Suggest .into() over try_into() when it would work) - #71087 (Remove `FnCtxt::impl_self_ty`) - #71097 (Pattern docs) - #71101 (Miri: let machine hook dynamically decide about alignment checks) Failed merges: r? @ghost
2020-04-13Auto merge of #70989 - eddyb:mir-opt-32-pr-ci, r=Mark-Simulacrumbors-0/+1
ci: run mir-opt tests on PR CI also as 32-bit (for `EMIT_MIR_FOR_EACH_BIT_WIDTH`). Background: #69916 and [`src/test/mir-opt/README.md`](https://github.com/rust-lang/rust/blob/master/src/test/mir-opt/README.md): > By default 32 bit and 64 bit targets use the same dump files, which can be problematic in the presence of pointers in constants or other bit width dependent things. In that case you can add > > ``` > // EMIT_MIR_FOR_EACH_BIT_WIDTH > ``` > > to your test, causing separate files to be generated for 32bit and 64bit systems. However, if you change the output of such a test (intentionally or not), or if you add a test and it varies between 32-bit and 64-bit platforms, you have to run this command (for a x64 linux host): `./x.py test --stage 1 --target x86_64-unknown-linux-gnu --target i686-unknown-linux-gnu --bless src/test/mir-opt` Otherwise, bors trying to merge the PR will fail, since we test 32-bit targets there. But we don't on PR CI, which means there's no way the PR author would know (unless they were burnt by this already and know what to look for). This PR resolves that by running `mir-opt` tests for ~~`i686-unknown-linux-gnu`~~, on PR CI. **EDIT**: switched to `armv5te-unknown-linux-gnueabi` to work around LLVM 7 crashes (see https://github.com/rust-lang/compiler-builtins/pull/311#issuecomment-612270089), found during testing. cc @rust-lang/wg-mir-opt @rust-lang/infra
2020-04-13Remove `FnCtxt::impl_self_ty`Yuki Okushi-1/+1
2020-04-12fix issue 69130David Renshaw-0/+28
2020-04-12Auto merge of #69926 - RoccoDev:master, r=estebank,varkorbors-8/+21
rustc: Add a warning count upon completion This adds a `build completed with one warning/x warnings` message, similar to the already present `aborted due to previous error` message.
2020-04-11rustc: Add a warning count upon completionRoccoDev-8/+21
2020-04-11tests: add missing `// no-system-llvm` annotation to #69841 test.Eduard-Mihai Burtescu-0/+1
2020-04-11Rollup merge of #70982 - ldm0:fncoerce, r=eddybMazdak Farrokhzad-0/+14
Normalize function signature in function casting check procedure Fixes #54094 ```rust trait Zoo { type X; } impl Zoo for u16 { type X = usize; } fn foo(abc: <u16 as Zoo>::X) {} fn main() { let x: *const u8 = foo as _; } ``` Currently a `FnDef` need to be checked if it's able to cast to `FnPtr` before it is actually casted. But the signature of `FnPtr` target's associated types are not normalized: https://github.com/rust-lang/rust/blob/96d77f0e5f103612d62b85938aacfb33f5768433/src/librustc_typeck/check/cast.rs#L536-L553 However, during the coercion check, the signature of `FnPtr` target's associated types are normalized (The `<u16 as Zoo>::X` turns into `usize`). https://github.com/rust-lang/rust/blob/96d77f0e5f103612d62b85938aacfb33f5768433/src/librustc_typeck/check/coercion.rs#L687-L729 This inconsistency leads to the error:`Err(Sorts(ExpectedFound { expected: <u16 as Zoo>::X, found: usize }))`.
2020-04-10Rollup merge of #69745 - estebank:predicate-obligations-3, r=nikomatsakis,eddybMazdak Farrokhzad-19/+38
Use `PredicateObligation`s instead of `Predicate`s Keep more information about trait binding failures. Use more specific spans by pointing at bindings that introduce obligations. Subset of #69709. r? @eddyb
2020-04-10Tidy fixDonough Liu-1/+1
2020-04-10Rollup merge of #70784 - estebank:suggest-type-fundamental-method, ↵Mazdak Farrokhzad-2/+16
r=matthewjasper Consider methods on fundamental `impl` when method is not found on numeric type Fix #47759.
2020-04-10Normalize function signature in function casting checkDonough Liu-0/+14
2020-04-09Consider methods on fundamental `impl` when method is not found on numeric typeEsteban Küber-2/+16
Fix #47759.
2020-04-08Small tweaks to required bound spanEsteban Küber-13/+13
2020-04-08Use `PredicateObligation`s instead of `Predicate`sEsteban Küber-10/+29
Keep more information about trait binding failures.
2020-04-05"cannot resolve" → "cannot satisfy"Esteban Küber-6/+6
2020-04-03Rollup merge of #70720 - ecstatic-morse:issue-70637, r=oli-obkMazdak Farrokhzad-0/+12
Place TLS initializers with relocations in .tdata Should fix #70673, although I'm not sure how to test this. Perhaps @joshlf could find a MCVE? Also adds more context to the FIXME. r? @oli-obk
2020-04-03Add regression test for #70673Oliver Scherer-0/+12
2020-04-03Rollup merge of #70725 - Centril:nix-unwraps, r=estebankDylan DPC-0/+51
Avoid `.unwrap()`s on `.span_to_snippet(...)`s First commit fixes https://github.com/rust-lang/rust/issues/70724 and the others fix similar issues found by grepping. r? @estebank
2020-04-03Auto merge of #70582 - pnkfelix:update-llvm-to-fix-69841, r=cuviperbors-0/+30
Fix #69841 by updating LLVM submodule. Fix #69841 by updating LLVM submodule. Includes regression test for issue 69841.
2020-04-03add_type_neq_err_label: don't .unwrapMazdak Farrokhzad-0/+51
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-56/+21
2020-04-01Rollup merge of #70081 - lcnr:issue68387, r=varkorDylan DPC-0/+2
add `unused_braces` lint Add the lint `unused_braces` which is warn by default. `unused_parens` is also extended and now checks anon consts. closes #68387 r? @varkor
2020-03-31update testsBastian Kauschke-0/+2
2020-03-30Fix #69841 by updating LLVM submodule. Includes regression test for issue 69841.Felix S. Klock II-0/+30
2020-03-29Tweak `suggest_constraining_type_param`Esteban Küber-17/+13
Some of the bound restriction structured suggestions were incorrect while others had subpar output.
2020-03-28Auto merge of #70095 - jsgf:link-native, r=nagisabors-0/+8
Implement -Zlink-native-libraries This implements a flag `-Zlink-native-libraries=yes/no`. If set to true/yes, or unspecified, then native libraries referenced via `#[link]` attributes will be put on the linker line (ie, unchanged behaviour). If `-Zlink-native-libraries=no` is specified then rustc will not add the native libraries to the link line. The assumption is that the outer build system driving the build already knows about the native libraries and will specify them to the linker directly (for example via `-Clink-arg=`). Addresses issue #70093
2020-03-27Rollup merge of #70457 - Centril:non-exhaustive-scrutinee-type, r=estebankMazdak Farrokhzad-0/+12
non-exhastive diagnostic: add note re. scrutinee type This fixes https://github.com/rust-lang/rust/issues/67259 by adding a note: ``` = note: the matched value is of type &[i32] ``` to non-exhaustive pattern matching errors. r? @varkor @estebank
2020-03-27Implement -Zlink-native-librariesJeremy Fitzhardinge-0/+8
This implements a flag `-Zlink-native-libraries=yes/no`. If set to true/yes, or unspecified, then native libraries referenced via `#[link]` attributes will be put on the linker line (ie, unchanged behaviour). If `-Zlink-native-libraries=no` is specified then rustc will not add the native libraries to the link line. The assumption is that the outer build system driving the build already knows about the native libraries and will specify them to the linker directly (for example via `-Clink-arg=`). Addresses issue #70093
2020-03-27non-exhastive diagnostic: add note re. scrutinee typeMazdak Farrokhzad-0/+12
2020-03-27Auto merge of #68404 - Amanieu:llvm-asm, r=estebankbors-34/+34
Rename asm! to llvm_asm! As per https://github.com/rust-lang/rfcs/pull/2843, this PR renames `asm!` to `llvm_asm!`. It also renames the compiler's internal `InlineAsm` data structures to `LlvmInlineAsm` in preparation for the new `asm!` functionality specified in https://github.com/rust-lang/rfcs/pull/2850. This PR doesn't actually deprecate `asm!` yet, it just makes it redirect to `llvm_asm!`. This is necessary because we first need to update the submodules (in particular stdarch) to use `llvm_asm!`.
2020-03-27Rollup merge of #70435 - Alexendoo:test-66706, r=CentrilDylan DPC-0/+45
Add regression test for #66706 Adds the two cases that no longer ICE (https://github.com/rust-lang/rust/issues/66706#issuecomment-604098436)
2020-03-27Rollup merge of #69936 - Aaron1011:fix/suggestion-cycle, r=varkorDylan DPC-0/+71
Fix cycle error when emitting suggestion for mismatched `fn` type Fixes #66667 Previously, we called `tcx.typeck_tables_of` when determining whether or not to emit a suggestion for a type error. However, we might already be type-checking the `DefId` we pass to `typeck_tables_of` (it could be anywhere in the query stack). Fortunately, we only need the function signature, not the entire `TypeckTables`. By using `tcx.fn_sig`, we avoid the possibility of cycle errors while retaining the ability to emit a suggestion.
2020-03-26Add regression test for #66706Alex Macleod-0/+45
2020-03-26Update tests to use llvm_asm!Amanieu d'Antras-34/+34
2020-03-26introduce `negative_impls` feature gate and documentNiko Matsakis-4/+7
They used to be covered by `optin_builtin_traits` but negative impls are now applicable to all traits, not just auto traits. This also adds docs in the unstable book for the current state of auto traits.
2020-03-26make a custom error for overlap with negative implsNiko Matsakis-31/+22
2020-03-24Rollup merge of #70077 - Aaron1011:feature/new-def-path-ident, r=petrochenkovMazdak Farrokhzad-2/+28
Store idents for `DefPathData` into crate metadata Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in a side table, which gets encoded into the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-24Rollup merge of #69981 - oli-obk:const_blocks, r=eddybMazdak Farrokhzad-12/+28
Evaluate repeat expression lengths as late as possible Fixes #68567 r? @varkor