Commit Graph

1237 Commits

Author SHA1 Message Date
Josh Soref 5a69bc9fd0 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
Matthias Krüger 9affa23583 Rollup merge of #110404 - matthiaskrgr:mapmap, r=Nilstrieb
fix clippy::toplevel_ref_arg and ::manual_map

r? ``@Nilstrieb``
2023-04-17 08:09:40 +02:00
Matthias Krüger e70e5b4ac5 fix clippy::toplevel_ref_arg and ::manual_map 2023-04-16 13:28:13 +02:00
Matthias Krüger 7f632978ad use matches! macro in more places 2023-04-16 12:08:30 +02:00
Matthias Krüger 853eadd822 remove redundant clones 2023-04-15 18:04:51 +02:00
bors 309584a835 Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #109810 (Replace rustdoc-ui/{c,z}-help tests with a stable run-make test )
 - #110035 (fix: ensure bad `#[test]` invocs retain correct AST)
 - #110089 (sync::mpsc: synchronize receiver disconnect with initialization)
 - #110103 (Report overflows gracefully with new solver)
 - #110122 (Fix x check --stage 1 when download-ci-llvm=false)
 - #110133 (Do not use ImplDerivedObligationCause for inherent impl method error reporting)
 - #110135 (Revert "Don't recover lifetimes/labels containing emojis as character literals")
 - #110235 (Fix `--extend-css` option)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-12 22:19:29 +00:00
Matthias Krüger 009839e04b Rollup merge of #110135 - compiler-errors:revert-108031, r=davidtwco
Revert "Don't recover lifetimes/labels containing emojis as character literals"

Reverts PR #108031 per https://github.com/rust-lang/rust/pull/109754#issuecomment-1490452045

Fixes (doesnt close until beta backported) #109746

This reverts commit 20352b2d30.
This reverts commit 39758ab015.
This reverts commit 51aa2a3e2b.
2023-04-12 22:04:35 +02:00
Matthias Krüger 58583f8dc8 Rollup merge of #110203 - compiler-errors:rtn-dots, r=eholk
Remove `..` from return type notation

`@nikomatsakis` and I decided that using `..` in the return-type notation syntax is probably overkill.

r? `@eholk` since you reviewed the last one

Since this is piggybacking now totally off of a pre-existing syntax (parenthesized generics), let me know if you need any explanation of the logic here, since it's a bit more complicated now.
2023-04-12 20:56:22 +02:00
Michael Goulet e4cd226e01 Remove .. from return type notation 2023-04-10 22:19:46 +00:00
DaniPopes 20b0d20135 Fix typos in compiler 2023-04-10 22:02:52 +02:00
Michael Goulet 575b1c6547 Revert "Don't recover lifetimes/labels containing emojis as character literals"
Reverts PR #108031
Fixes (doesnt close until beta backported) #109746

This reverts commit 20352b2d30.
This reverts commit 39758ab015.
This reverts commit 51aa2a3e2b.
2023-04-10 06:52:41 +00:00
Nilstrieb dfcc294859 Remove identity casts 2023-04-09 23:22:14 +02:00
Nilstrieb e357edcf38 Fix some clippy::complexity 2023-04-09 23:22:14 +02:00
Ezra Shaw 317b1e4543 fix: fix regression in #109203 2023-04-07 08:54:13 +12:00
bors b21b313af8 Auto merge of #109117 - oli-obk:locks, r=michaelwoerister
Avoid a few locks

We can use atomics or datastructures tuned for specific access patterns instead of locks. This may be an improvement for parallel rustc, but it's mostly a cleanup making various datastructures only usable in the way they are used right now (append data, never mutate), instead of having a general purpose lock.
2023-04-05 10:38:02 +00:00
Oli Scherer 4d3875b3db Rename ast::Static to ast::StaticItem to match ast::ConstItem 2023-04-04 15:34:40 +00:00
Oli Scherer 85a54bec1d box a bunch of large types 2023-04-04 13:58:50 +00:00
Oli Scherer 093b7bd282 Split out ast::ItemKind::Const into its own struct 2023-04-04 09:44:50 +00:00
Oli Scherer 5eb3f475ee rust-analyzer guided tuple field to named field 2023-04-04 09:44:50 +00:00
Oli Scherer 1fb37c1528 rust-analyzer guided enum variant structification 2023-04-04 09:44:45 +00:00
Oli Scherer 426655cb72 Use a simpler atomic operation than the compare_exchange hammer 2023-04-04 09:01:44 +00:00
Oli Scherer 5ed357e255 Replace another lock with an append-only vec 2023-04-04 09:01:44 +00:00
Oli Scherer aa34458a44 Replace a lock with an atomic 2023-04-04 09:01:44 +00:00
Michael Goulet 50685c1a22 Add (..) syntax for RTN 2023-03-28 01:14:28 +00:00
Michael Goulet 4745d6c688 RTN 2023-03-28 01:02:15 +00:00
Guillaume Gomez 93845efd73 Rollup merge of #109354 - Swatinem:rm-closureid, r=compiler-errors
Remove the `NodeId` of `ast::ExprKind::Async`

This is a followup to https://github.com/rust-lang/rust/pull/104833#pullrequestreview-1314537416.

In my original attempt, I was using `LoweringContext::expr`, which was not correct as it creates a fresh `DefId`.
It now uses the correct `DefId` for the wrapping `Expr`, and also makes forwarding `#[track_caller]` attributes more explicit.
2023-03-27 18:56:19 +02:00
Matthias Krüger 60f9e7f944 Rollup merge of #109203 - Ezrashaw:refactor-ident-parsing, r=Nilstrieb
refactor/feat: refactor identifier parsing a bit

\+ error recovery for `expected_ident_found`

Prior art: #108854
2023-03-22 22:44:39 +01:00
Nicholas Nethercote 2afacbec0a Refactor handle_missing_lit. 2023-03-21 09:28:52 +11:00
Ezra Shaw e63c992238 feat: implement error recovery in expected_ident_found 2023-03-20 20:54:41 +13:00
Arpad Borsos fa240268e2 Remove the NodeId of ast::ExprKind::Async 2023-03-19 19:01:31 +01:00
Ezra Shaw 8663814ecc refactor: improve "ident starts with number" error 2023-03-19 20:24:06 +13:00
Ezra Shaw 0f8caf09d7 refactor: refactor identifier parsing somewhat 2023-03-19 20:20:20 +13:00
bors 2e36174867 Auto merge of #108471 - clubby789:unbox-the-syntax, r=Nilstrieb,est31
Remove `box_syntax`

r? `@Nilstrieb`

This removes the feature `box_syntax`, which allows the use of `box <expr>` to create a Box, and finalises removing use of the feature from the compiler. `box_patterns` (allowing the use of `box <pat>` in a pattern) is unaffected.
It also removes `ast::ExprKind::Box` - the only way to create a 'box' expression now is with the rustc-internal `#[rustc_box]` attribute.
As a temporary measure to help users move away, `box <expr>` now parses the inner expression, and emits a `MachineApplicable` lint to replace it with `Box::new`

Closes #49733
2023-03-13 10:41:50 +00:00
Matthias Krüger e8042f432e Rollup merge of #109029 - compiler-errors:parse-gating, r=jackh726
Gate usages of `dyn*` and const closures in macros

We silently accepted `dyn*` and const closures in macros as long as they didn't expand to anything containing these experimental features, unlike other gated features such as `for<'a>` binders on closures, etc. Let's not do that, to make sure nobody begins relying on this.
2023-03-12 20:44:51 +01:00
clubby789 780a145328 Add recovery for use of removed box syntax 2023-03-12 13:26:37 +00:00
clubby789 ca91f7d86c Remove box_syntax from AST and use in tools 2023-03-12 13:19:46 +00:00
est31 a82d31d2da Simplify message paths
This makes it easier to open the messages file while developing on features.

The commit was the result of automatted changes:

for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done

for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
2023-03-11 22:51:57 +01:00
Michael Goulet 90ec00c8ad Gate const closures even when they appear in macros 2023-03-11 21:29:28 +00:00
Michael Goulet bb7829dd37 Gate all usages of dyn*, even in macros 2023-03-11 21:29:28 +00:00
Matthias Krüger 0eb85c26a1 Rollup merge of #108900 - bvanjoi:issue-108275, r=petrochenkov
fix(lexer): print whitespace warning for \x0c

- close https://github.com/rust-lang/rust/issues/108275
- discussion: https://github.com/rust-lang/rust/pull/108403
2023-03-10 19:59:19 +01:00
bohan 2ca5cc8c63 fix(lexer): not skipped whitespace warning for '\x0c' 2023-03-09 22:44:58 +08:00
Matthias Krüger cf79a10568 Rollup merge of #108854 - Ezrashaw:improve-int-idents, r=oli-obk
feat/refactor: improve errors in case of ident with number at start

Improve parser code when we parse a integer (or float) literal but expect an identifier. We emit an error message saying that identifiers can't begin with numbers. This PR just improves that code and expands it to all identifiers. Note that I haven't implemented error recovery (this didn't exist before anyway), I might do that in a follow up PR.
2023-03-09 12:11:53 +01:00
Ezra Shaw 7f844dd580 feat/refactor: improve errors in case of ident with number at start 2023-03-09 21:29:32 +13:00
Maybe Waffle 02c458fa2a Simplify sort_by calls 2023-03-07 18:13:41 +00:00
Matthias Krüger 5c791173e8 Rollup merge of #108715 - chenyukang:yukang/cleanup-parser-delims, r=compiler-errors
Remove unclosed_delims from parser

After landing https://github.com/rust-lang/rust/pull/108297
we could remove `unclosed_delims` from the parser now.
2023-03-04 20:48:17 +01:00
Dylan DPC 3b956ecbb0 Rollup merge of #108298 - TaKO8Ki:fix-104440, r=cjgillot
Fix ICE: check if snippet is `)`

Fixes #107705
2023-03-04 15:24:37 +05:30
yukang d150fbfff9 Remove unclosed_delims from parser 2023-03-03 23:09:36 +00:00
est31 c1706b43e9 Match unmatched backticks in comments in compiler/ 2023-03-03 08:39:00 +01:00
Takayuki Maeda d8eeb47c1a check if snippet is ) 2023-03-03 14:34:11 +09:00
y21 efe7368340 recover from for-else and while-else 2023-03-01 13:26:59 +01:00