about summary refs log tree commit diff
path: root/tests/ui/span
AgeCommit message (Collapse)AuthorLines
2023-11-24Show number in error message even for one errorNilstrieb-49/+49
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-07Rework print_disambiguation_helpMichael Goulet-4/+4
2023-10-26Tweak suggestion spans for invalid crate-level inner attributeEsteban Küber-2/+6
CC #89566.
2023-10-25Make THIR unused_unsafe lint consistent with MIRMatthew Jasper-305/+1592
Updates THIR behavior to match the changes from #93678
2023-10-02Replace `HashMap` with `IndexMap` in pattern binding resolveNilstrieb-17/+17
It will be iterated over, so we should avoid using `HashMap`.
2023-09-21adjust how closure/generator types and rvalues are printedRalf Jung-2/+2
2023-09-17Rollup merge of #114965 - benschulz:mpsc-drop, r=dtolnayDylan DPC-6/+4
Remove Drop impl of mpsc Receiver and (Sync)Sender This change removes the empty `Drop` implementations for `mpsc::Receiver`, `mpsc::Sender` and `mpsc::SyncSender`. These implementations do not specify `#[may_dangle]`, so by removing them we make `mpsc` types play nice with drop check. This was previously attempted in [#105243](https://github.com/rust-lang/rust/pull/105243#issuecomment-1337188646) but then [abandoned due to a test failure](https://github.com/rust-lang/rust/pull/105243#issuecomment-1337227970). I've aligned the test with those for `Mutex` and `RwLock`.
2023-09-10Point out if a local trait has no implementationsMichael Goulet-0/+6
2023-08-18Bless test changesGary Guo-10/+10
2023-08-18Remove Drop impl of mpsc Receiver and (Sync)SenderBen Schulz-6/+4
2023-08-05Auto merge of #109348 - cjgillot:issue-109146, r=petrochenkovbors-4/+4
Resolve visibility paths as modules not as types. Asking for a resolution with `opt_ns = Some(TypeNS)` allows path resolution to look for type-relative paths, leaving unresolved segments behind. However, for visibility paths we really need to look for a module, so we need to pass `opt_ns = None`. Fixes https://github.com/rust-lang/rust/issues/109146 r? `@petrochenkov`
2023-08-04Improve spans for indexing expressionsNilstrieb-2/+2
Indexing is similar to method calls in having an arbitrary left-hand-side and then something on the right, which is the main part of the expression. Method calls already have a span for that right part, but indexing does not. This means that long method chains that use indexing have really bad spans, especially when the indexing panics and that span in coverted into a panic location. This does the same thing as method calls for the AST and HIR, storing an extra span which is then put into the `fn_span` field in THIR.
2023-08-02Resolve visibility paths as modules not as types.Camille GILLOT-4/+4
2023-07-10Do not set up wrong span for adjustmentsMichael Goulet-30/+32
2023-07-08Rollup merge of #113005 - compiler-errors:dont-query-normalize, r=cjgillotMatthias Krüger-2/+2
Don't call `query_normalize` when reporting similar impls Firstly, It's sketchy to be using `query_normalize` at all during HIR typeck -- it's asking for an ICE 😅. Secondly, we're normalizing an impl trait ref that potentially has parameter types in `ty::ParamEnv::empty()`, which is kinda sketchy as well. The only UI test change from removing this normalization is that we don't evaluate anonymous constants in impls, which end up giving us really ugly suggestions: ``` error[E0277]: the trait bound `[X; 35]: Default` is not satisfied --> /home/gh-compiler-errors/test.rs:4:5 | 4 | <[X; 35] as Default>::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[X; 35]` | = help: the following other types implement trait `Default`: &[T] &mut [T] [T; 32] [T; core::::array::{impl#30}::{constant#0}] [T; core::::array::{impl#31}::{constant#0}] [T; core::::array::{impl#32}::{constant#0}] [T; core::::array::{impl#33}::{constant#0}] [T; core::::array::{impl#34}::{constant#0}] and 27 others ``` So just fold the impls with a `BottomUpFolder` that calls `ty::Const::eval`. This doesn't work totally correctly with generic-const-exprs, but it's fine for stable code, and this is error reporting after all.
2023-06-27Don't sort strings right after we just sorted by typesMichael Goulet-2/+2
2023-06-24fix testasquared31415-3/+28
2023-05-09Rollup merge of #110583 - Ezrashaw:tweak-make-mut-spans, r=estebankDylan DPC-15/+15
tweak "make mut" spans when assigning to locals Work towards fixing #106857 This PR just cleans up a lot of spans which is helpful before properly fixing the issues. Best reviewed commit-by-commit. r? `@estebank`
2023-05-08Tweak borrow suggestionMichael Goulet-8/+13
2023-05-05tweak "make mut" spans (No. 3)Ezra Shaw-10/+10
2023-05-05tweak "make mut" spans (No. 2)Ezra Shaw-5/+5
2023-04-27Provide RHS type hint when reporting operator errorMichael Goulet-2/+2
2023-04-21Evaluate place expression in `PlaceMention`.Camille GILLOT-2/+0
2023-04-19Make missing impl item suggestions more obvious that they're missingMichael Goulet-3/+3
2023-04-12Special-case item attributes in the suggestion outputEsteban Küber-2/+0
2023-04-12Tweak output for 'add line' suggestionEsteban Küber-2/+5
2023-03-08may not => cannotMichael Goulet-8/+8
2023-02-28Exit when there are unmatched delims to avoid noisy diagnosticsyukang-99/+6
2023-02-22diagnostics: update test cases to refer to assoc fn with `self` as methodMichael Howell-11/+11
2023-02-14Make removal suggestion not verboseEsteban Küber-12/+8
2023-02-14rebase and review commentsEsteban Küber-2/+2
2023-02-14More accurate spans for arg removal suggestionEsteban Küber-4/+6
2023-02-11Pacify tidy.Camille GILLOT-0/+1
2023-02-11Intern span when length is MAX_LEN with parent.Camille GILLOT-0/+8
2023-01-30Modify primary span label for E0308Esteban Küber-5/+5
The previous output was unintuitive to users.
2023-01-17Account for method call and indexing when looking for inner-most path in ↵Esteban Küber-7/+18
expression
2023-01-17Account for `*` when looking for inner-most path in expressionEsteban Küber-0/+14
2023-01-15Tweak E0597Esteban Küber-16/+118
CC #99430
2023-01-12Point at impl self type for impl wf obligationsMichael Goulet-4/+4
2023-01-11Move /src/test to /testsAlbert Larsan-0/+7833