Lukas Wirth
b97ab00bd4
Split out rustc_lexer from rustc_dependencies
2024-01-08 15:24:46 +01:00
riverbl
3c378b9c70
Add inlay hint for exclusive ranges
...
Adds an inlay hint containing a '<' character to exclusive range expressions and patterns that specify an upper bound.
2024-01-07 09:33:56 +00:00
hkalbasi
f4704bc8ae
Switch to in-tree rustc dependencies with a cfg flag
2023-09-15 18:10:11 +03:30
Lukas Wirth
4b577e2bc8
Support c string literals
2023-05-18 11:06:05 +02:00
Lukas Wirth
099b5b3b15
internal: Bump rustc_lexer
2023-05-18 10:17:40 +02:00
Josh Soref
bc7d84c3ce
Spelling
...
* a rule
* access
* after
* amount
* annotations
* assignment
* assist
* associated
* attribute
* borrowed
* built-in type
* clarification
* command
* const
* constructor
* corresponding
* counterparts
* curlies
* dependencies
* deterministic
* diagnostic
* duplicates
* edge
* edited
* efficient
* elsewhere
* execution
* expression
* extensions
* extracted
* fill
* github
* helper
* heuristic
* incomplete
* indent end
* inlay
* invocation
* lifetime
* looking
* maybe
* move
* mutability
* mutable
* necessarily
* necessary
* negative
* nonexistent
* occurred
* offsets
* offsetted
* overridden
* parameters
* params
* params_and_where_preds_in_scope
* paredit
* parent
* parentheses
* prepended if
* punctuation
* receive
* receiver
* referring
* repeated
* representing
* semantically
* separately
* shouldnot
* siblings
* similar
* something's
* statement
* struct
* structure
* surprise
* the
* this
* transparent
* unimplemented
* unnamed
* unnecessary
* unneeded
* unreachable
* unterminated
* utilities
* variant
* variants
* visibility
* work around (v)
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-19 09:45:55 -04:00
Yuri Astrakhan
d3dbf9c194
Moar linting: needless_borrow, let_unit_value, ...
...
* There are a few needless borrows that don't seem to be needed. I even did a quick assembly comparison and posted a q to stackoveflow on it. See [here](https://stackoverflow.com/questions/74910196/advantages-of-pass-by-ref-val-with-impl-intoiteratoritem-impl-asrefstr )
* removed several `let _ = ...` when they don't look necessary (even a few ones that were not suggested by clippy (?))
* there were a few `then(|| ctor{})` that clippy suggested to replace with `then_some(ctor{})` -- seems reasonable?
* some unneeded assignment+return - keep the code a bit leaner
* a few `writeln!` instead of `write!`, or even consolidate write!
* a nice optimization to use `ch.is_ascii_digit` instead of `ch.is_digit(10)`
2022-12-25 05:07:47 -05:00
Nicholas Nethercote
7d2a1ee4fc
Remove unescape_byte_literal
.
...
It's easy to just use `unescape_literal` + `byte_from_char`.
2022-11-05 13:56:36 +11:00
Jonas Schievink
6c6ae965ba
Update remaining GitHub URLs
2022-07-08 15:44:49 +02:00
Jonas Schievink
9bd11459ba
Revert "Auto merge of #12149 - jonas-schievink:literally-just-a-literal, r=jonas-schievink"
...
This reverts commit cc9ae2b89e
, reversing
changes made to 7dfd1cb572
.
2022-05-13 15:08:14 +02:00
Jonas Schievink
2d5d16f18c
Remove ast::Literal::token
2022-05-05 16:27:35 +02:00
Laurențiu Nicola
9856144b0b
Lower values of char and byte literals
2022-05-05 08:12:08 +03:00
harpsword
b1f858118b
fix visibility token validation in trait impl with proc-macro
2022-04-27 20:58:36 +08:00
Chayim Refael Friedman
821b791b6d
Validate let
expressions
...
Emit an error if they're found in an invalid position.
2022-02-21 08:34:35 +02:00
Lukas Wirth
901c7c7277
match_ast!
takes a pattern to allow underscore usage
2021-12-14 12:44:31 +01:00
Laurențiu Nicola
b23bebebc0
Remove validation of super
in use paths
2021-11-16 20:02:42 +02:00
Lukas Wirth
1294bfce86
Migrate to edition 2021
2021-10-21 20:10:40 +02:00
Aramis Razzaghipour
55c0b86cde
Add semicolons for consistency
...
`clippy::semicolon_if_nothing_returned`
2021-10-03 23:39:43 +11:00
Lukas Wirth
b6ed91a6de
Rename *Owner
traits to Has*
2021-09-27 12:54:24 +02:00
Aleksey Kladov
defe805fb7
internal: fix and force-disable block validation ;-(
...
Originally we tried to maintain the invariant that `{}` always match.
That is, that in the parse tree the pair of corresponding `{}` is always
first and last tokens of some nodes.
We had the code to validate that, but apparently it's been broken for
**years** since we introduced tokens/nodes split. Fixing it now makes
some tests fail.
It's unclear if we want to keep this invariant: there's a strong
motivation for breaking it in the following case:
```
use std::{ // unclosed paren
fn main() {
}
} // don't actually want to pair up this with the one from `use`
```
So let's fix the code, but disable it for the time being
2021-09-26 15:49:23 +03:00
Aleksey Kladov
5767f31cbf
minor: align code with code-style
2021-09-25 14:55:42 +03:00
Lukas Wirth
9c39363ada
Simplify
2021-09-19 23:34:07 +02:00
Lukas Wirth
f6cb42fdb8
Restrict completions inside visibility modifiers
2021-07-20 18:37:52 +02:00
Matthias Krüger
202b51bc7b
a lot of clippy::style fixes
2021-03-21 16:15:41 +01:00
Lukas Wirth
70d43c3faf
Add validation for mutable const items
2021-01-24 02:17:41 +01:00
Aleksey Kladov
46b4f89c92
.
2021-01-20 01:56:11 +03:00
Lukas Wirth
cb863390f2
Handle self/super/crate in PathSegment as NameRef
2021-01-15 19:21:23 +01:00
bors[bot]
607b9ea160
Merge #7218
...
7218: Fix typos r=Veykril a=regexident
Apart from the very last commit on this PR (which fixes a public type's name) all changes are non-breaking.
Co-authored-by: Vincent Esche <regexident@gmail.com>
2021-01-10 18:16:29 +00:00
Laurențiu Nicola
10e7fd25fe
Fix typo, parentheses is plural
2021-01-10 17:56:53 +02:00
Vincent Esche
6cd93db8a5
Fixed typos in code asserts
2021-01-09 15:41:29 +01:00
Jonas Schievink
479babf874
Reject visibilities on macro_rules!
2020-12-15 15:37:49 +01:00
Aleksey Kladov
5db789df9c
Cleanup API
2020-11-06 22:52:42 +01:00
Aleksey Kladov
5ba4f949c2
Kill RAW_ literals
...
Syntactically, they are indistinguishable from non-raw versions, so it
doesn't make sense to separate then *at the syntax* level.
2020-11-06 22:23:14 +01:00
Lukas Wirth
6f38552edb
Add validation check for ambiguous trait objects
2020-10-06 23:52:00 +02:00
Aleksey Kladov
a1c187eef3
Rename ra_syntax -> syntax
2020-08-12 18:30:53 +02:00