about summary refs log tree commit diff
path: root/src/test/ui/c-variadic/variadic-ffi-4.stderr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-150/+0
2022-04-04Format invariance notes with backticksMichael Goulet-16/+16
2021-12-31Ensure that early-bound function lifetimes are always 'local'Aaron Hill-1/+1
During borrowchecking, we treat any free (early-bound) regions on the 'defining type' as `RegionClassification::External`. According to the doc comments, we should only have 'external' regions when checking a closure/generator. However, a plain function can also have some if its regions be considered 'early bound' - this occurs when the region is constrained by an argument, appears in a `where` clause, or in an opaque type. This was causing us to incorrectly mark these regions as 'external', which caused some diagnostic code to act as if we were referring to a 'parent' region from inside a closure. This PR marks all instantiated region variables as 'local' when we're borrow-checking something other than a closure/generator/inline-const.
2021-12-29Refactor variance diagnostics to work with more typesAaron Hill-0/+28
Instead of special-casing mutable pointers/references, we now support general generic types (currently, we handle `ty::Ref`, `ty::RawPtr`, and `ty::Adt`) When a `ty::Adt` is involved, we show an additional note explaining which of the type's generic parameters is invariant (e.g. the `T` in `Cell<T>`). Currently, we don't explain *why* a particular generic parameter ends up becoming invariant. In the general case, this could require printing a long 'backtrace' of types, so doing this would be more suitable for a follow-up PR. We still only handle the case where our variance switches to `ty::Invariant`.
2021-06-06Add variance-related information to lifetime error messagesAaron Hill-0/+8
2020-09-02pretty: trim paths of unique symbolsDan Aloni-17/+17
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-05-22Update testsMatthew Jasper-189/+86
2019-12-03Include a span in more `expected...found` notesAaron Hill-3/+7
In most places, we use a span when emitting `expected...found` errors. However, there were a couple of places where we didn't use any span, resulting in hard-to-interpret error messages. This commit attaches the relevant span to these notes, and additionally switches over to using `note_expected_found` instead of manually formatting the message
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-10/+10
2019-10-11Print lifetimes with backticksYuki Okushi-1/+1
2019-10-07update ui testsGuillaume Gomez-1/+2
2019-09-28rustc: rely on c_variadic == true instead of CVarArgs in HIR/Ty fn signatures.Eduard-Mihai Burtescu-131/+68
2019-09-28rustc: don't store a lifetime in hir::TyKind::CVarArgs.Eduard-Mihai Burtescu-8/+8
2019-07-14Make VaListImpl<'f> invariant over the 'f lifetimeAndrei Homescu-36/+86
2019-06-17Expose `VaListImpl` as the Rust equivalent of `__va_list_tag` and implement ↵Andrei Homescu-27/+54
Clone for it.
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-1/+1
2019-03-22ffi: rename VaList::copy to VaList::with_copyDan Robertson-11/+11
Rename `VaList::copy` to `VaList::with_copy`.
2019-03-11Update testsVadim Petrochenkov-41/+41
2019-02-27Support defining C compatible variadic functionsDan Robertson-0/+198
Add support for defining C compatible variadic functions in unsafe rust with extern "C".