Commit Graph

13 Commits

Author SHA1 Message Date
David Tolnay
7b0e315ae6
Update stability attribute sanity UI test to delete superfluous errors 2023-10-24 15:50:24 -07:00
David Tolnay
6a02e20fb5
Update since stability attributes in tests 2023-10-23 13:04:47 -07:00
Deadbeef
6c1e3bb6e9 bless tests 2023-08-06 13:34:53 +00:00
bors
08fd6f719e Auto merge of #111269 - clubby789:validate-fluent-variables, r=davidtwco
Validate fluent variable references in tests

Closes #101109

Under `cfg(test)`, the `fluent_messages` macro will emit a list of variables referenced by each message and its attributes. The derive attribute will now emit a `#[test]` that checks that each referenced variable exists in the structure it's applied to.
2023-06-28 03:47:02 +00:00
Esteban Küber
7dffd24da5 Tweak privacy errors to account for reachable items
Suggest publicly accessible paths for items in private mod:

  When encountering a path in non-import situations that are not reachable
  due to privacy constraints, search for any public re-exports that the
  user could use instead.

Track whether an import suggestion is offering a re-export.

When encountering a path with private segments, mention if the item at
the final path segment is not publicly accessible at all.

Add item visibility metadata to privacy errors from imports:

  On unreachable imports, record the item that was being imported in order
  to suggest publicly available re-exports or to be explicit that the item
  is not available publicly from any path.

  In order to allow this, we add a mode to `resolve_path` that will not
  add new privacy errors, nor return early if it encounters one. This way
  we can get the `Res` corresponding to the final item in the import,
  which is used in the privacy error machinery.
2023-06-22 16:50:31 +00:00
clubby789
220bb61b33 Fix diagnostics with errors 2023-05-26 10:44:18 +00:00
Gary Guo
de492a3894 Update tests 2023-04-29 13:01:46 +01:00
Ezra Shaw
0dc36fcd5b
fix: don't suggest similar method when unstable 2023-03-18 16:19:00 +13:00
Matthias Krüger
9c99a4ca2b
Rollup merge of #107801 - davidtwco:stability-implies-const, r=Nilstrieb
const_eval: `implies_by` in `rustc_const_unstable`

Fixes #107605.

Extend support for `implies_by` (from `#[stable]` and `#[unstable]`) to `#[rustc_const_stable]` and `#[rustc_const_unstable]`.

cc ``@steffahn``
2023-03-06 16:41:56 +01:00
Deadbeef
ed34354bfa Do not lint unresolved trait for ineffective unstable trait impl 2023-02-25 10:12:20 +00:00
David Wood
912783402f const_eval: implies_by in rustc_const_unstable
Extend support for `implies_by` (from `#[stable]` and `#[unstable]`)
to `#[rustc_const_stable]` and `#[rustc_const_unstable]`.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-08 15:09:11 +00:00
Ezra Shaw
be1a6db9f8
fix: don't emit E0711 if staged_api not enabled 2023-01-14 22:04:42 +13:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00