Commit Graph

430 Commits

Author SHA1 Message Date
Eric Huss
f481596ee4 Remove edition umbrella features. 2023-12-10 13:03:28 -08:00
Michael Goulet
dd5abb50cc Yeet E0744 2023-11-28 20:40:38 +00:00
Mark Rousskov
db3e2bacb6 Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
bors
992943dbae Auto merge of #117537 - GKFX:offset-of-enum-feature, r=cjgillot
Feature gate enums in offset_of

As requested at https://github.com/rust-lang/rust/issues/106655#issuecomment-1790815262, put enums in offset_of behind their own feature gate.

`@rustbot` label F-offset_of
2023-11-05 13:44:59 +00:00
Nicholas Nethercote
5c462a32bd Remove support for compiler plugins.
They've been deprecated for four years.

This commit includes the following changes.
- It eliminates the `rustc_plugin_impl` crate.
- It changes the language used for lints in
  `compiler/rustc_driver_impl/src/lib.rs` and
  `compiler/rustc_lint/src/context.rs`. External lints are now called
  "loaded" lints, rather than "plugins" to avoid confusion with the old
  plugins. This only has a tiny effect on the output of `-W help`.
- E0457 and E0498 are no longer used.
- E0463 is narrowed, now only relating to unfound crates, not plugins.
- The `plugin` feature was moved from "active" to "removed".
- It removes the entire plugins chapter from the unstable book.
- It removes quite a few tests, mostly all of those in
  `tests/ui-fulldeps/plugin/`.

Closes #29597.
2023-11-04 08:50:46 +11:00
George Bateman
ee3a729cc4
enable feature gate in E0795.md 2023-11-03 17:08:32 +00:00
George Bateman
e936416a8d
Support enum variants in offset_of! 2023-10-31 23:25:54 +00:00
Nicholas Nethercote
8ff624a9f2 Clean up rustc_*/Cargo.toml.
- Sort dependencies and features sections.
- Add `tidy` markers to the sorted sections so they stay sorted.
- Remove empty `[lib`] sections.
- Remove "See more keys..." comments.

Excluded files:
- rustc_codegen_{cranelift,gcc}, because they're external.
- rustc_lexer, because it has external use.
- stable_mir, because it has external use.
2023-10-30 08:46:02 +11:00
Oli Scherer
258af95a60 Replace all uses of generator in markdown documentation with coroutine 2023-10-20 21:14:02 +00:00
Oli Scherer
60956837cf s/Generator/Coroutine/ 2023-10-20 21:10:38 +00:00
Michael Howell
2ff2624722 docs: add Rust logo to more compiler crates
c6e6ecb1af added it to some of the
compiler's crates, but avoided adding it to all of them to reduce
bit-rot. This commit adds to more.
2023-10-16 15:38:08 -07:00
Michael Goulet
ef04c9795b Deprecate E0706 2023-10-13 21:01:36 +00:00
bors
94bc9c737e Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiser
Show more information when multiple `impl`s apply

- When there are `impl`s without type params, show only those (to avoid showing overly generic `impl`s).
```
error[E0283]: type annotations needed
  --> $DIR/multiple-impl-apply.rs:34:9
   |
LL |     let y = x.into();
   |         ^     ---- type must be known at this point
   |
note: multiple `impl`s satisfying `_: From<Baz>` found
  --> $DIR/multiple-impl-apply.rs:14:1
   |
LL | impl From<Baz> for Bar {
   | ^^^^^^^^^^^^^^^^^^^^^^
...
LL | impl From<Baz> for Foo {
   | ^^^^^^^^^^^^^^^^^^^^^^
   = note: required for `Baz` to implement `Into<_>`
help: consider giving `y` an explicit type
   |
LL |     let y: /* Type */ = x.into();
   |          ++++++++++++
```

- Lower the importance of `T: Sized`, `T: WellFormed` and coercion errors, to prioritize more relevant errors. The pre-existing deduplication logic deals with hiding redundant errors better that way, and we show errors with more metadata that is useful to the user.

- Show `<SelfTy as Trait>::assoc_fn` suggestion in more cases.
```
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
  --> $DIR/cross-return-site-inference.rs:38:16
   |
LL |     return Err(From::from("foo"));
   |                ^^^^^^^^^^ cannot call associated function of trait
   |
help: use a fully-qualified path to a specific available implementation
   |
LL |     return Err(</* self type */ as From>::from("foo"));
   |                +++++++++++++++++++     +
```

Fix #88284.
2023-10-06 18:44:32 +00:00
Nicholas Nethercote
0ece171c2f Remove E0551.
Because it's the same as E0539.

Fixes #51489.
2023-10-04 18:12:20 +11:00
Esteban Küber
4a0c676791 Update docs for E0282 and E0283, as E0282 now doesn't trigger for collect 2023-10-04 02:04:14 +00:00
bors
7b4d9e155f Auto merge of #115659 - compiler-errors:itp, r=cjgillot
Stabilize `impl_trait_projections`

Closes #115659

## TL;DR:

This allows us to mention `Self` and `T::Assoc` in async fn and return-position `impl Trait`, as you would expect you'd be able to.

Some examples:
```rust
#![feature(return_position_impl_trait_in_trait, async_fn_in_trait)]
// (just needed for final tests below)

// ---------------------------------------- //

struct Wrapper<'a, T>(&'a T);

impl Wrapper<'_, ()> {
    async fn async_fn() -> Self {
        //^ Previously rejected because it returns `-> Self`, not `-> Wrapper<'_, ()>`.
        Wrapper(&())
    }

    fn impl_trait() -> impl Iterator<Item = Self> {
        //^ Previously rejected because it mentions `Self`, not `Wrapper<'_, ()>`.
        std::iter::once(Wrapper(&()))
    }
}

// ---------------------------------------- //

trait Trait<'a> {
    type Assoc;
    fn new() -> Self::Assoc;
}
impl Trait<'_> for () {
    type Assoc = ();
    fn new() {}
}

impl<'a, T: Trait<'a>> Wrapper<'a, T> {
    async fn mk_assoc() -> T::Assoc {
        //^ Previously rejected because `T::Assoc` doesn't mention `'a` in the HIR,
        //  but ends up resolving to `<T as Trait<'a>>::Assoc`, which does rely on `'a`.
        // That's the important part -- the elided trait.
        T::new()
    }

    fn a_few_assocs() -> impl Iterator<Item = T::Assoc> {
        //^ Previously rejected for the same reason
        [T::new(), T::new(), T::new()].into_iter()
    }
}

// ---------------------------------------- //

trait InTrait {
    async fn async_fn() -> Self;

    fn impl_trait() -> impl Iterator<Item = Self>;
}

impl InTrait for &() {
    async fn async_fn() -> Self { &() }
    //^ Previously rejected just like inherent impls

    fn impl_trait() -> impl Iterator<Item = Self> {
        //^ Previously rejected just like inherent impls
        [&()].into_iter()
    }
}
```

## Technical:

Lifetimes in return-position `impl Trait` (and `async fn`) are duplicated as early-bound generics local to the opaque in order to make sure we are able to substitute any late-bound lifetimes from the function in the opaque's hidden type. (The [dev guide](https://rustc-dev-guide.rust-lang.org/return-position-impl-trait-in-trait.html#aside-opaque-lifetime-duplication) has a small section about why this is necessary -- this was written for RPITITs, but it applies to all RPITs)

Prior to #103491, all of the early-bound lifetimes not local to the opaque were replaced with `'static` to avoid issues where relating opaques caused their *non-captured* lifetimes to be related. This `'static` replacement led to strange and possibly unsound behaviors (https://github.com/rust-lang/rust/issues/61949#issuecomment-508836314) (https://github.com/rust-lang/rust/issues/53613) when referencing the `Self` type alias in an impl or indirectly referencing a lifetime parameter via a projection type (via a `T::Assoc` projection without an explicit trait), since lifetime resolution is performed on the HIR, when neither `T::Assoc`-style projections or `Self` in impls are expanded.

Therefore an error was implemented in #62849 to deny this subtle behavior as a known limitation of the compiler. It was attempted by `@cjgillot` to fix this in #91403, which was subsequently unlanded. Then it was re-attempted to much success (🎉) in #103491, which is where we currently are in the compiler.

The PR above (#103491) fixed this issue technically by *not* replacing the opaque's parent lifetimes with `'static`, but instead using variance to properly track which lifetimes are captured and are not. The PR gated any of the "side-effects" of the PR behind a feature gate (`impl_trait_projections`) presumably to avoid having to involve T-lang or T-types in the PR as well. `@cjgillot` can clarify this if I'm misunderstanding what their intention was with the feature gate.

Since we're not replacing (possibly *invariant*!) lifetimes with `'static` anymore, there are no more soundness concerns here. Therefore, this PR removes the feature gate.

Tests:
* `tests/ui/async-await/feature-self-return-type.rs`
* `tests/ui/impl-trait/feature-self-return-type.rs`
* `tests/ui/async-await/issues/issue-78600.rs`
* `tests/ui/impl-trait/capture-lifetime-not-in-hir.rs`

---

r? cjgillot on the impl (not much, just removing the feature gate)

I'm gonna mark this as FCP for T-lang and T-types.
2023-09-28 21:35:18 +00:00
bors
5ae769f06b Auto merge of #116144 - lcnr:subst-less, r=oli-obk
subst -> instantiate

continues #110793, there are still quite a few uses of `subst` and `substitute`, but changing them all in the same PR was a bit too much, so I've stopped here for now.
2023-09-26 21:32:44 +00:00
Matthias Krüger
6f4a0a1eb2
Rollup merge of #116162 - fmease:gate-n-validate-rustc_safe_intrinsic, r=Nilstrieb
Gate and validate `#[rustc_safe_intrinsic]`

Copied over from #116159:

> This was added as ungated in https://github.com/rust-lang/rust/pull/100719/files#diff-09c366d3ad3ec9a42125253b610ca83cad6b156aa2a723f6c7e83eddef7b1e8fR502, probably because the author looked at the surrounding attributes, which are ungated because they are gated specially behind the staged_api feature.
>
> I don't think we need to crater this, the attribute is entirely useless without the intrinsics feature, which is already unstable..

r? ``@Nilstrieb``
2023-09-26 15:57:26 +02:00
lcnr
3c52a3e280 subst -> instantiate 2023-09-26 09:37:55 +02:00
León Orell Valerian Liehr
f54db7c3a9
Gate and validate #[rustc_safe_intrinsic] 2023-09-25 22:33:15 +02:00
Camille GILLOT
baa64b0e77 Remove dead error code. 2023-09-23 13:47:30 +00:00
Eduardo Sánchez Muñoz
17dfabff9c Change start to #[start] in some diagnosis
They refer to a function with the `start` attribute, but not necessarily named `start`.
2023-09-22 15:58:43 +02:00
bors
203c57dbe2 Auto merge of #115334 - RalfJung:transparent-aligned-zst, r=compiler-errors
repr(transparent): it's fine if the one non-1-ZST field is a ZST

This code currently gets rejected:
```rust
#[repr(transparent)]
struct MyType([u16; 0])
```
That clearly seems like a bug to me: `repr(transparent)` [got defined ](https://github.com/rust-lang/rust/issues/77841#issuecomment-716575747) as having any number of 1-ZST fields plus optionally one more field; `MyType` clearly satisfies that definition.

This PR changes the `repr(transparent)` logic to actually match that definition.
2023-09-17 15:20:44 +00:00
bors
c728bf3963 Auto merge of #114656 - bossmc:rework-no-coverage-attr, r=oli-obk
Rework `no_coverage` to `coverage(off)`

As discussed at the tail of https://github.com/rust-lang/rust/issues/84605 this replaces the `no_coverage` attribute with a `coverage` attribute that takes sub-parameters (currently `off` and `on`) to control the coverage instrumentation.

Allows future-proofing for things like `coverage(off, reason="Tested live", issue="#12345")` or similar.
2023-09-14 01:05:18 +00:00
León Orell Valerian Liehr
b00e408e61
Generalize E0401 2023-09-10 23:06:14 +02:00
Andy Caldwell
8e03371fc3
Rework no_coverage to coverage(off) 2023-09-08 12:46:06 +01:00
Michael Goulet
e4af4e5083 Stabilize impl_trait_projections 2023-09-08 03:45:36 +00:00
bors
1accf068d8 Auto merge of #113126 - Bryanskiy:delete_old, r=petrochenkov
Replace old private-in-public diagnostic with type privacy lints

Next part of RFC https://github.com/rust-lang/rust/issues/48054.

r? `@petrochenkov`
2023-09-01 12:40:01 +00:00
Ralf Jung
a6ccd265e6 mark error code as removed 2023-08-29 14:11:50 +02:00
Ralf Jung
d7c8950838 tell people what to do when removing an error code 2023-08-27 19:12:42 +02:00
Bruce Mitchener
fd2982c0a7 Fix syntax in E0191 explanation.
This trait needs `dyn` in modern Rust.

Fixes #115042.
2023-08-21 18:45:51 +07:00
Josh Stone
cd50556e90
Rollup merge of #113715 - kadiwa4:lang_items_doc, r=JohnTitor
Unstable Book: update `lang_items` page and split it

[`lang_items` rendered](https://github.com/kadiwa4/rust/blob/lang_items_doc/src/doc/unstable-book/src/language-features/lang-items.md), [`start` rendered](https://github.com/kadiwa4/rust/blob/lang_items_doc/src/doc/unstable-book/src/language-features/start.md)
Closes #110274
Rustonomicon PR: rust-lang/nomicon#413, Rust Book PR: rust-lang/book#3705

A lot of information doesn't belong on the `lang_items` page. I added a separate page for the `start` feature and moved some text into the Rustonomicon because the `lang_items` page should not be a tutorial on how to build a `#![no_std]` executable.
The list of existing lang items is too long/unstable, so I removed it.

The doctests still don't work. :(
2023-08-17 15:40:08 -07:00
bors
28b6607b5f Auto merge of #109348 - cjgillot:issue-109146, r=petrochenkov
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-05 11:52:07 +00:00
kadiwa
7c6bbdbd95
unstable book: update lang_items page and split it 2023-08-04 18:40:54 +02:00
Matthias Krüger
f36a9b5e18
Rollup merge of #113534 - oli-obk:simd_shuffle_dehackify, r=workingjubilee
Forbid old-style `simd_shuffleN` intrinsics

Don't merge before https://github.com/rust-lang/packed_simd/pull/350 has made its way to crates.io

We used to support specifying the lane length of simd_shuffle ops by attaching the lane length to the name of the intrinsic (like `simd_shuffle16`). After this PR, you cannot do that anymore, and need to instead either rely on inference of the `idx` argument type or specify it as `simd_shuffle::<_, [u32; 16], _>`.

r? `@workingjubilee`
2023-08-04 07:25:45 +02:00
Nilstrieb
5830ca216d Add internal_features lint
It lints against features that are inteded to be internal to the
compiler and standard library. Implements MCP #596.

We allow `internal_features` in the standard library and compiler as those
use many features and this _is_ the standard library from the "internal to the compiler and
standard library" after all.

Marking some features as internal wasn't exactly the most scientific approach, I just marked some
mostly obvious features. While there is a categorization in the macro,
it's not very well upheld (should probably be fixed in another PR).

We always pass `-Ainternal_features` in the testsuite
About 400 UI tests and several other tests use internal features.
Instead of throwing the attribute on each one, just always allow them.
There's nothing wrong with testing internal features^^
2023-08-03 14:50:50 +02:00
Oli Scherer
4457ef2c6d Forbid old-style simd_shuffleN intrinsics 2023-08-03 09:29:00 +00:00
Camille GILLOT
69ea85da02 Adapt error code doc. 2023-08-02 15:30:29 +00:00
Bryanskiy
e26614e6a7 Replace old private-in-public diagnostic with type privacy lints 2023-08-02 13:40:28 +03:00
David Rheinsberg
b0dadff6de error/E0691: include alignment in error message
Include the computed alignment of the violating field when rejecting
transparent types with non-trivially aligned ZSTs.

ZST member fields in transparent types must have an alignment of 1 (to
ensure it does not raise the layout requirements of the transparent
field). The current error message looks like this:

 LL | struct Foobar(u32, [u32; 0]);
    |                    ^^^^^^^^ has alignment larger than 1

This patch changes the report to include the alignment of the violating
field:

 LL | struct Foobar(u32, [u32; 0]);
    |                    ^^^^^^^^ has alignment of 4, which is larger than 1

In case of unknown alignments, it will yield:

 LL | struct Foobar<T>(u32, [T; 0]);
    |                       ^^^^^^ may have alignment larger than 1

This allows developers to get a better grasp why a specific field is
rejected. Knowing the alignment of the violating field makes it easier
to judge where that alignment-requirement originates, and thus hopefully
provide better hints on how to mitigate the problem.

This idea was proposed in 2022 in #98071 as part of a bigger change.
This commit simply extracts this error-message change, to decouple it
from the other diagnostic improvements.
2023-07-21 11:04:16 +02:00
nxya
c429a72db9 add links to query documentation for E0391 2023-07-18 09:20:25 -04:00
Michael Goulet
847d50453c Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
Wim Looman
8f94253254
Add details about unsafe_op_in_unsafe_fn to E0133 2023-05-28 13:11:30 +02:00
Matthias Krüger
363d158cd8
Rollup merge of #111215 - BoxyUwU:resolve_anon_consts_differently, r=cjgillot
Various changes to name resolution of anon consts

Sorry this PR is kind of all over the place ^^'

Fixes #111012

- Rewrites anon const nameres to all go through `fn resolve_anon_const` explicitly instead of `visit_anon_const` to ensure that we do not accidentally resolve anon consts as if they are allowed to use generics when they aren't. Also means that we dont have bits of code for resolving anon consts that will get out of sync (i.e. legacy const generics and resolving path consts that were parsed as type arguments)
- Renames two of the `LifetimeRibKind`, `AnonConst -> ConcreteAnonConst` and `ConstGeneric -> ConstParamTy`
- Noticed while doing this that under `generic_const_exprs` all lifetimes currently get resolved to errors without any error being emitted which was causing a bunch of tests to pass without their bugs having been fixed, incidentally fixed that in this PR and marked those tests as `// known-bug:`. I'm fine to break those since `generic_const_exprs` is a very unstable incomplete feature and this PR _does_ make generic_const_exprs "less broken" as a whole, also I can't be assed to figure out what the underlying causes of all of them are. This PR reopens #77357 #83993
- Changed `generics_of` to stop providing generics and predicates to enum variant discriminant anon consts since those are not allowed to use generic parameters
- Updated the error for non 'static lifetime in const arguments and the error for non 'static lifetime in const param tys to use `derive(Diagnostic)`

I have a vague idea why const-arg-in-const-arg.rs, in-closure.rs and simple.rs have started failing which is unfortunate since these were deliberately made to work, I think lifetime resolution being broken just means this regressed at some point and nobody noticed because the tests were not testing anything :( I'm fine breaking these too for the same reason as the tests for #77357 #83993. I couldn't get `// known-bug` to work for these ICEs and just kept getting different stderr between CI and local `--bless` so I just removed them and will create an issue to track re-adding (and fixing) the bugs if this PR lands.

r? `@cjgillot` cc `@compiler-errors`
2023-05-09 20:49:32 +02:00
Astroide
d6ef6e0080
Update compiler/rustc_error_codes/src/error_codes/E0726.md
Co-authored-by: Michael Goulet <michael@errs.io>
2023-05-06 19:39:08 -04:00
Astroide
b2acf3ea64
rustc --explain E0726 - grammar fixing (it's => its + add a the where it felt right to do so) 2023-05-06 12:42:52 -04:00
Boxy
442617c046 misc nameres changes for anon consts 2023-05-05 21:31:35 +01:00
Josh Soref
e09d0d2a29 Spelling - compiler
* account
* achieved
* advising
* always
* ambiguous
* analysis
* annotations
* appropriate
* build
* candidates
* cascading
* category
* character
* clarification
* compound
* conceptually
* constituent
* consts
* convenience
* corresponds
* debruijn
* debug
* debugable
* debuggable
* deterministic
* discriminant
* display
* documentation
* doesn't
* ellipsis
* erroneous
* evaluability
* evaluate
* evaluation
* explicitly
* fallible
* fulfill
* getting
* has
* highlighting
* illustrative
* imported
* incompatible
* infringing
* initialized
* into
* intrinsic
* introduced
* javascript
* liveness
* metadata
* monomorphization
* nonexistent
* nontrivial
* obligation
* obligations
* offset
* opaque
* opportunities
* opt-in
* outlive
* overlapping
* paragraph
* parentheses
* poisson
* precisely
* predecessors
* predicates
* preexisting
* propagated
* really
* reentrant
* referent
* responsibility
* rustonomicon
* shortcircuit
* simplifiable
* simplifications
* specify
* stabilized
* structurally
* suggestibility
* translatable
* transmuting
* two
* unclosed
* uninhabited
* visibility
* volatile
* workaround

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-17 16:09:18 -04:00
Tam Pham
87b3ae3909 Make "unneccesary visibility qualifier" error much more clear 2023-04-03 21:52:27 -05:00
Matthias Krüger
eee3f484f9
Rollup merge of #109565 - WaffleLapkin:better_docs_for_e0223, r=oli-obk
Improve documentation for E0223

See discussion in https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Inconsistency.20in.20prohibiting.20.60Type.3A.3AAssocType.60
2023-03-28 07:01:08 +02:00
Maybe Waffle
904dd2c398 Bless tidy 2023-03-27 18:58:07 +00:00
Maybe Waffle
3c4fabc341 Improve documentation for E0223 2023-03-27 18:00:22 +00:00
Matthias Krüger
783f3a1965
Rollup merge of #109501 - lukas-code:link, r=WaffleLapkin
make link clickable
2023-03-22 22:44:43 +01:00
Lukas Markeffsky
1581b97acb make link clickable 2023-03-22 22:01:19 +01:00
Eric Huss
572c56cb7e Update links for custom discriminants. 2023-03-18 10:22:37 -07:00
Matthias Krüger
9599f3cc54
Rollup merge of #107416 - czzrr:issue-80618, r=GuillaumeGomez
Error code E0794 for late-bound lifetime parameter error.

This PR addresses [#80618](https://github.com/rust-lang/rust/issues/80618).
2023-03-18 12:04:21 +01:00
Matthias Krüger
e7d6369ed4
Rollup merge of #109211 - mili-l:mili_l/update_e0206_description, r=WaffleLapkin
E0206 - update description

added `union` to description
2023-03-18 00:05:52 +01:00
Jamilya Shurukhova
c4bb47ac36
Update compiler/rustc_error_codes/src/error_codes/E0206.md
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
2023-03-17 15:50:37 +01:00
Jamilya Shurukhova
05dc132adb E0206 - code review changes 2023-03-17 14:54:39 +01:00
Jamilya Shurukhova
1f12c3e397 E0206 - removed space 2023-03-16 10:26:34 +01:00
Jamilya Shurukhova
dc39bf8efc E0206 - added union to description 2023-03-16 10:18:31 +01:00
gimbles
e5a5b90afc unequal → not equal 2023-03-15 23:55:48 +05:30
clubby789
dd7df04e16 Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
est31
7f4cc178f0 Address the new odd backticks tidy lint in compiler/ 2023-03-11 20:40:18 +01:00
Christopher Acosta
75563cd725 Error code E0794 for late-bound lifetime parameter error. 2023-03-07 21:26:19 +01:00
Ezra Shaw
90677edcba
refactor: statically guarantee that current error codes are documented 2023-02-26 20:12:36 +13:00
Ezra Shaw
9f876cc900
docs/test: add UI test and docs for E0476 2023-02-25 19:31:02 +13:00
Matthew Kelly
2bcd4e256a Add extended error message for E0523
Adds the extended error documentation for E0523 to indicate that the
error is no longer produced by the compiler.

Update the E0464 documentation to include example code that produces the
error.

Remove the error message E0523 from the compiler and replace it with an
internal compiler error.
2023-02-06 06:58:30 -05:00
Ralf Jung
dfc4a7b2d0 make unaligned_reference a hard error 2023-01-31 20:28:11 +01:00
Samuel Ortiz
706132d409 compiler: Fix E0587 explanation
We meant to use 8 as the packed argument.

Signed-off-by: Samuel Ortiz <sameo@rivosinc.com>
2023-01-27 10:59:51 +01:00
Ezra Shaw
00ff718da8
add UI test + docs for E0789 2023-01-23 20:38:14 +13:00
Guillaume Gomez
246daa49ee
Rollup merge of #106931 - Ezrashaw:docs-e0208, r=compiler-errors
document + UI test `E0208` and make its output more user-friendly

Cleans up `E0208`'s output a lot. It could actually be useful for someone learning about variance now. I also added a UI test for it in `tests/ui/error-codes/` and wrote some docs for it.

r? `@GuillaumeGomez` another error code, can't be bothered to find the issue :P. Obviously there's some compiler stuff, so you'll have to hand it off.

Part of https://github.com/rust-lang/rust/issues/61137.
2023-01-19 11:19:35 +01:00
Ezra Shaw
708861e5b7
remove error code from #[rustc_variance] and document its remains 2023-01-18 21:10:27 +13:00
Matthias Krüger
68f12338af
Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726
Remove double spaces after dots in comments

Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17 20:21:25 +01:00
Maybe Waffle
6a28fb42a8 Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
Oli Scherer
6b69b5e460 Improve a TAIT error and add an error code plus documentation 2023-01-16 16:54:14 +00:00
nils
c61f29ca52
Rollup merge of #106714 - Ezrashaw:remove-e0490, r=davidtwco
remove unreachable error code `E0490`

AFAIK, the untested and undocumented error code `E0490` is now unreachable, it was from the days of the original borrow checker.

cc ``@GuillaumeGomez`` #61137
2023-01-12 15:44:52 +01:00
Ezra Shaw
02005e9f22
remove unreachable error code E0490 2023-01-12 14:15:21 +13:00
bowlerman
f75eb24f4f remove E0280 and ICE instead 2023-01-10 03:04:28 +01:00
Ezra Shaw
24ce65c8d6
docs/test: add error-docs and UI test for E0711 2023-01-09 15:48:53 +13:00
Ezra Shaw
ecc0507fdd
docs/test: add empty error-docs for E0208, E0640 and E0717 2023-01-09 15:48:52 +13:00
Yuki Okushi
6459a51c3f
Rollup merge of #106580 - Ezrashaw:remove-e0313, r=compiler-errors
remove unreachable error code `E0313`

Fixes #103742
Makes #103433 redundant

Implements removal of `E0313`. I agree with the linked issue that this error code is unreachable but if someone could confirm that would be great, are crater runs done for this sort of thing?

Also removed a redundant `// ignore-tidy-filelength` that I found while reading code.

cc ``@GuillaumeGomez`` #61137
2023-01-08 17:01:49 +09:00
Yuki Okushi
3b5afa590b
Rollup merge of #106557 - Ezrashaw:ui-test-fixups-1, r=GuillaumeGomez
Add some UI tests and reword error-code docs

Added UI tests for `E0013` and `E0015`. Error code docs for `E0015` were a bit unclear (they referred to all non-const errors in const context, when only non-const functions applied), so I touched them up a bit.

I also fixed up some issues in the new `error_codes.rs` tidy check (linked #106341), that I overlooked previously.

r? ``@GuillaumeGomez``
2023-01-08 17:01:48 +09:00
Ezra Shaw
93c0d8d5d5
remove unreachable error code E0313 2023-01-08 14:47:12 +13:00
Ezra Shaw
ae61c250cd
doc/test: add UI test and reword docs for E0013 and E0015 2023-01-08 13:33:09 +13:00
Michael Goulet
01cb9dcd5b
Rollup merge of #106554 - LingMan:explanation_typo, r=compiler-errors
Fix a typo in the explanation of E0588
2023-01-06 21:54:01 -08:00
LingMan
dc0e4207d4 Fix a typo in the explanation of E0588 2023-01-07 05:10:53 +01:00
Ezra Shaw
9618f646b3
docs: revert removal of E0729 2023-01-02 09:11:36 +13:00
Ezra Shaw
04b9038610
refactor: clean up errors.rs and error_codes_check.rs
Move them into new `error_codes.rs` tidy check.
2023-01-01 15:22:01 +13:00
Ezra Shaw
24b39ece2f
refactor: merge E0465 into E0464 2022-12-31 20:44:54 +13:00
Ezra Shaw
726519d4f5
docs: add long-form error docs for E0514 2022-12-29 14:32:39 +13:00
Ezra Shaw
da7fcc7a09
docs/test: add UI test and long-form error docs for E0519 2022-12-29 13:16:10 +13:00
Ezra Shaw
f66e7529b5
docs: add long-form error docs for E0461 2022-12-27 17:03:39 +13:00
Matthias Krüger
e08dd9d998
Rollup merge of #105970 - Ezrashaw:add-docs+test-e0462, r=GuillaumeGomez
docs/test: add UI test and long-form error docs for E0462

Another UI test/ docs combo.

r? ``@GuillaumeGomez``
2022-12-24 00:31:40 +01:00
Ezra Shaw
66ed1812cf
docs/test: add UI test and long-form error docs for E0462 2022-12-23 10:56:16 +13:00
Matthias Krüger
4726e514d7
Rollup merge of #105791 - Ezrashaw:add-e0472-long-docs, r=GuillaumeGomez
docs: add long error explanation for error E0472

Add long-form error docs for E0472: "inline assembly not supported on this target" and update UI tests.

R? `@GuillaumeGomez`
2022-12-20 23:35:14 +01:00
Ezra Shaw
082ca1e461
docs: add long error explanation for error E0472 2022-12-20 21:34:30 +13:00
Ezra Shaw
e798fdf7be
docs/test: add UI test and long-form error docs for E0377 2022-12-20 18:31:15 +13:00
Ezra Shaw
5ecac8ede6
more markdown list formatting
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2022-12-19 22:50:31 +13:00
Ezra Shaw
540c3f434f
docs: add long-form error-code docs for E0457 2022-12-19 08:55:08 +13:00