about summary refs log tree commit diff
path: root/src/test/ui-fulldeps
AgeCommit message (Collapse)AuthorLines
2021-10-03Update ui-fulldeps.Camille GILLOT-5/+5
2021-09-30Bless tests.Camille GILLOT-9/+10
2021-09-26Remove box syntax from most places in src/test outside of the issues direst31-17/+14
2021-09-03Detect bare blocks with type ascription that were meant to be a `struct` literalEsteban Kuber-0/+1
Address part of #34255. Potential improvement: silence the other knock down errors in `issue-34255-1.rs`.
2021-08-22Fix typos “an”→“a” and a few different ones that appeared in the ↵Frank Steffahn-1/+1
same search
2021-08-15Introduce hir::ExprKind::Let - Take 2Caio-1/+1
2021-08-10Replace #[plugin_registrar] with exporting __rustc_plugin_registrarbjorn3-32/+72
2021-07-27Add long explanation for E0498Chris Midgley-0/+1
2021-07-25Introduce OwnerNode::Crate.Camille GILLOT-2/+2
2021-07-19Various diagnostics clean ups/tweaksEsteban Küber-0/+5
* Always point at macros, including derive macros * Point at non-local items that introduce a trait requirement * On private associated item, point at definition
2021-07-13Auto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obkbors-20/+27
Fix internal `default_hash_types` lint to use resolved path I run into false positives now and then (mostly in Clippy) when I want to name some util after HashMap.
2021-07-09Fix default_hash_types to use resolved pathCameron Steffen-20/+27
2021-07-08Rework SESSION_GLOBALS API to prevent overwriting itGuillaume Gomez-2/+2
2021-06-10Auto merge of #80080 - rylev:qpath-on-struct, r=petrochenkovbors-67/+60
Allow qualified paths in struct construction (both expressions and patterns) Fixes #79658
2021-06-10Auto merge of #86098 - pietroalbini:test-stable, r=Mark-Simulacrumbors-18/+24
Add the x86_64-gnu-stable builder During the 1.52 release process we had to deal with some commits that passed the test suite on the nightly branch but failed on the beta or stable branch. In that case it was due to some UI tests including the channel name in the output, but other changes might also be dependent on the channel. This commit adds a new CI job that runs the Linux x86_64 test suite with the stable branch, ensuring nightly changes also work as stable. To ensure the new job works the following other changes are present: * The `ui-fulldeps/session-derive-errors.rs` test has been disabled on beta and stable, which required adding support for `// ignore-{channel}` and `// only-{channel}`. * The `rustdoc/intra-doc/field.rs` has been fixed. r? `@Mark-Simulacrum` fixes https://github.com/rust-lang/release-team/issues/11
2021-06-10Add support for using qualified paths with structs in expression and patternRyan Levick-67/+60
position.
2021-06-07ignore ui-fulldeps/session-derive-errors.rs on beta and stablePietro Albini-18/+24
The session-derive-errors test ensures the internal SessionDiagnostic derive macro outputs the right error messages when misused. The macro relies on the proc_macro2 crate though, which changes its span behavior depending on whether the channel is nightly or not. This caused test failures when bumping the channel from nightly to beta/stable. Since SessionDiagnostic is internal-only we don't care about its diagnostics quality outside of nightly, as the compiler itself is developed on nightly. Thus the easiest solution is to ignore that test on the beta and stable channels. This also implements `// only-{channel}` and `// ignore-{channel}` in compiletest to properly support the change.
2021-06-06Don't pass -Z unstable-options by default for UI testsJoshua Nelson-3/+4
- Pass it explicitly where appropriate - Update stderr files and warnings; it turns that unstable-options has far-reaching effects on diagnostics.
2021-05-12Show macro name in 'this error originates in macro' messageAaron Hill-4/+4
When there are multiple macros in use, it can be difficult to tell which one was responsible for producing an error.
2021-03-30Fix fulldeps tests.Camille GILLOT-2/+2
2021-03-16ast: Reduce size of `ExprKind` by boxing fields of `ExprKind::Struct`Vadim Petrochenkov-1/+3
2021-03-09Rebase fallout.Camille GILLOT-1/+1
2021-03-09Fix ui-fulldeps tests.Camille GILLOT-3/+5
2021-02-03Allow/fix non_fmt_panic in tests.Mara Bos-3/+3
2021-01-17Fix formatting for removed lintsJoshua Nelson-9/+9
- Don't add backticks for the reason a lint was removed. This is almost never a code block, and when it is the backticks should be in the reason itself. - Don't assume clippy is the only tool that needs to be checked for backwards compatibility
2021-01-13Update tests for extern block lintingMark Rousskov-3/+2
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-3/+3
2020-12-03Only deny doc_keyword in std and set it as "allow" by defaultGuillaume Gomez-2/+8
2020-12-03Add test for EXISTING_DOC_KEYWORD internal lintGuillaume Gomez-0/+20
2020-12-02Auto merge of #78864 - Mark-Simulacrum:warn-on-forbids, r=pnkfelixbors-15/+15
Use true previous lint level when detecting overriden forbids Previously, cap-lints was ignored when checking the previous forbid level, which meant that it was a hard error to do so. This is different from the normal behavior of lints, which are silenced by cap-lints; if the forbid would not take effect regardless, there is not much point in complaining about the fact that we are reducing its level. It might be considered a bug that even `--cap-lints deny` would suffice to silence the error on overriding forbid, depending on if one cares about failing the build or precisely forbid being set. But setting cap-lints to deny is quite odd and not really done in practice, so we don't try to handle it specially. This also unifies the code paths for nested and same-level scopes. However, the special case for CLI lint flags is left in place (introduced by #70918) to fix the regression noted in #70819. That means that CLI flags do not lint on forbid being overridden by a non-forbid level. It is unclear whether this is a bug or a desirable feature, but it is certainly inconsistent. CLI flags are a sufficiently different "type" of place though that this is deemed out of scope for this commit. r? `@pnkfelix` perhaps? cc #77713 -- not marking as "Fixes" because of the lack of proper unused attribute handling in this PR
2020-11-18Revert "Auto merge of #79132 - pietroalbini:beta-next, r=Mark-Simulacrum"Pietro Albini-18/+29
This was landed on master instead of beta!
2020-11-17Update fulldeps testMark Rousskov-29/+18
2020-11-14Use true previous lint level when detecting overriden forbidsMark Rousskov-15/+15
Previously, cap-lints was ignored when checking the previous forbid level, which meant that it was a hard error to do so. This is different from the normal behavior of lints, which are silenced by cap-lints; if the forbid would not take effect regardless, there is not much point in complaining about the fact that we are reducing its level. It might be considered a bug that even `--cap-lints deny` would suffice to silence the error on overriding forbid, depending on if one cares about failing the build or precisely forbid being set. But setting cap-lints to deny is quite odd and not really done in practice, so we don't try to handle it specially. This also unifies the code paths for nested and same-level scopes. However, the special case for CLI lint flags is left in place (introduced by #70918) to fix the regression noted in #70819. That means that CLI flags do not lint on forbid being overridden by a non-forbid level. It is unclear whether this is a bug or a desirable feature, but it is certainly inconsistent. CLI flags are a sufficiently different "type" of place though that this is deemed out of scope for this commit.
2020-11-11Implement destructuring assignment for structs and slicesFabian Zaiser-1/+1
Co-authored-by: varkor <github@varkor.com>
2020-10-08Replace run_compiler with RunCompiler builder pattern.Darshan Kathiriya-8/+3
RunCompiler::new takes non-optional params, and optional params can be set using set_*field_name* method. finally `run` will forward all fields to `run_compiler`.
2020-09-28Rollup merge of #76474 - bjorn3:driver_selected_codegen, r=oli-obkRalf Jung-1/+7
Add option to pass a custom codegen backend from a driver This allows the driver to pass information to the codegen backend. For example the headcrab debugger may in the future want to use cg_clif to JIT code to be injected in the debuggee. This would PR make it possible to tell cg_clif which symbol can be found at which address and to tell it to inject the JITed code into the right process. This PR may also help with https://github.com/rust-lang/miri/pull/1540 by allowing miri to provide a codegen backend that only emits metadata and doesn't perform any codegen. cc @nbaksalyar (headcrab) cc @RalfJung (miri)
2020-09-27Add option to pass a custom codegen backend from a driverbjorn3-1/+7
2020-09-21add testBastian Kauschke-0/+53
2020-09-10Fully integrate token collection for additional AST structsAaron Hill-1/+2
This commit contains miscellaneous changes that don't fit into any of the other commits in this PR
2020-09-08Auto merge of #75138 - jumbatm:session-diagnostic-derive, r=oli-obkbors-0/+395
Add derive macro for specifying diagnostics using attributes. Introduces `#[derive(SessionDiagnostic)]`, a derive macro for specifying structs that can be converted to Diagnostics using directions given by attributes on the struct and its fields. Currently, the following attributes have been implemented: - `#[code = "..."]` -- this sets the Diagnostic's error code, and must be provided on the struct iself (ie, not on a field). Equivalent to calling `code`. - `#[message = "..."]` -- this sets the Diagnostic's primary error message. - `#[label = "..."]` -- this must be applied to fields of type `Span`, and is equivalent to `span_label` - `#[suggestion(..)]` -- this allows a suggestion message to be supplied. This attribute must be applied to a field of type `Span` or `(Span, Applicability)`, and is equivalent to calling `span_suggestion`. Valid arguments are: - `message = "..."` -- this sets the suggestion message. - (Optional) `code = "..."` -- this suggests code for the suggestion. Defaults to empty. `suggestion`also comes with other variants: `#[suggestion_short(..)]`, `#[suggestion_hidden(..)]` and `#[suggestion_verbose(..)]` which all take the same keys. Within the strings passed to each attribute, fields can be referenced without needing to be passed explicitly into the format string -- eg, `#[error = "{ident} already declared"] ` will set the error message to `format!("{} already declared", &self.ident)`. Any fields on the struct can be referenced in this way. Additionally, for any of these attributes, Option fields can be used to only optionally apply the decoration -- for example: ```rust #[derive(SessionDiagnostic)] #[code = "E0123"] struct SomeKindOfError { ... #[suggestion(message = "informative error message")] opt_sugg: Option<(Span, Applicability)> ... } ``` will not emit a suggestion if `opt_sugg` is `None`. We plan on iterating on this macro further; this PR is a start. Closes #61132. r? `@oli-obk`
2020-09-04Auto merge of #76292 - Aaron1011:fix/proc-macro-panic-hide, r=petrochenkovbors-0/+40
Respect `-Z proc-macro-backtrace` flag for panics inside libproc_macro Fixes #76270 Previously, any panic occuring during a call to a libproc_macro method (e.g. calling `Ident::new` with an invalid identifier) would always cause an ICE message to be printed.
2020-09-03Respect `-Z proc-macro-backtrace` flag for panics inside libproc_macroAaron Hill-0/+40
Fixes #76270 Previously, any panic occuring during a call to a libproc_macro method (e.g. calling `Ident::new` with an invalid identifier) would always cause an ICE message to be printed.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-2/+2
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-09-01Add SessionDiagnostic derive macro.jumbatm-0/+395
Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
2020-08-20Capture tokens for Pat used in macro_rules! argumentAaron Hill-0/+1
This extends PR #73293 to handle patterns (Pat). Unlike expressions, patterns do not support custom attributes, so we only need to capture tokens during macro_rules! argument parsing.
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-3/+3
2020-08-14Fix ui fulldeps testsMatthew Jasper-88/+75
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-4/+4
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-07-18rustc_metadata: Make crate loading fully speculativeVadim Petrochenkov-13/+3
2020-07-10Avoid "whitelist"Tamir Duberstein-11/+11
Other terms are more inclusive and precise.