summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates
AgeCommit message (Collapse)AuthorLines
2023-06-21Remove outdated import in r-a proc macro server.Mara Bos-4/+1
2023-06-20Add `Span::{line, column}`Jacob Pratt-0/+10
2023-06-20`Span::{before, after}` → `Span::{start, end}`Jacob Pratt-2/+2
2023-06-20Remove `LineColumn`, `Span::start`, `Span::end`Jacob Pratt-8/+0
2023-06-19Merge commit 'cd3bf9fe51676b520c546460e6d8919b8c8ff99f' into sync-from-raLaurențiu Nicola-1225/+3828
2023-06-05Merge commit 'ed87e0a20a9d196a5ea659ea46ae9574be666d4f' into sync-from-raLaurențiu Nicola-1/+3
2023-06-05Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-raLaurențiu Nicola-17275/+55887
2023-05-31Remove const eval limit and implement an exponential backoff lint insteadOli Scherer-4/+0
2023-05-26Update proc-macro-api for the new rustc metadata formatjyn-1/+1
2023-05-07Remove `identity_future` from stdlibArpad Borsos-1/+0
This function/lang_item was introduced in #104321 as a temporary workaround of future lowering. The usage and need for it went away in #104833. After a bootstrap update, the function itself can be removed from `std`.
2023-04-28Rollup merge of #110766 - m-ou-se:fmt-rt, r=jyn514Matthias Krüger-6/+6
More core::fmt::rt cleanup. - Removes the `V1` suffix from the `Argument` and `Flag` types. - Moves more of the format_args lang items into the `core::fmt::rt` module. (The only remaining lang item in `core::fmt` is `Arguments` itself, which is a public type.) Part of https://github.com/rust-lang/rust/issues/99012 Follow-up to https://github.com/rust-lang/rust/pull/110616
2023-04-25Revert "Remove #[alloc_error_handler] from the compiler and library"Matthias Krüger-0/+4
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
2023-04-24Remove "V1" from ArgumentsV1 and FlagsV1.Mara Bos-6/+6
2023-04-22Auto merge of #109507 - Amanieu:panic-oom-payload, r=davidtwcobors-4/+0
Report allocation errors as panics OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`. This should be review one commit at a time: - The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics. - The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API. ACP: https://github.com/rust-lang/libs-team/issues/192 Closes #51540 Closes #51245
2023-04-21Auto merge of #109002 - michaelvanstraten:master, r=petrochenkovbors-1/+5
Added byte position range for `proc_macro::Span` Currently, the [`Debug`](https://doc.rust-lang.org/beta/proc_macro/struct.Span.html#impl-Debug-for-Span) implementation for [`proc_macro::Span`](https://doc.rust-lang.org/beta/proc_macro/struct.Span.html#) calls the debug function implemented in the trait implementation of `server::Span` for the type `Rustc` in the `rustc-expand` crate. The current implementation, of the referenced function, looks something like this: ```rust fn debug(&mut self, span: Self::Span) -> String { if self.ecx.ecfg.span_debug { format!("{:?}", span) } else { format!("{:?} bytes({}..{})", span.ctxt(), span.lo().0, span.hi().0) } } ``` It returns the byte position of the [`Span`](https://doc.rust-lang.org/beta/proc_macro/struct.Span.html#) as an interpolated string. Because this is currently the only way to get a spans position in the file, I might lead someone, who is interested in this information, to parsing this interpolated string back into a range of bytes, which I think is a very non-rusty way. The proposed `position()`, method implemented in this PR, gives the ability to directly get this info. It returns a [`std::ops::Range`](https://doc.rust-lang.org/std/ops/struct.Range.html#) wrapping the lowest and highest byte of the [`Span`](https://doc.rust-lang.org/beta/proc_macro/struct.Span.html#). I put it behind the `proc_macro_span` feature flag because many of the other functions that have a similar footprint also are annotated with it, I don't actually know if this is right. It would be great if somebody could take a look at this, thank you very much in advanced.
2023-04-16Remove #[alloc_error_handler] from the compiler and libraryAmanieu d'Antras-4/+0
2023-03-20:arrow_up: rust-analyzerLaurențiu Nicola-587/+1957
2023-03-13Auto merge of #109069 - lnicola:rust-analyzer-2023-03-13, r=lnicolabors-3018/+12501
:arrow_up: `rust-analyzer` r? `@ghost`
2023-03-13:arrow_up: rust-analyzerLaurențiu Nicola-3018/+12501
2023-03-12Remove uses of `box_syntax` in rustc and toolsclubby789-2/+2
2023-03-11Renamed to byte_range and changed Range generics [skip ci]Michael van Straten-1/+1
2023-03-10Fixed rust-analyser: no implementation for position()Michael van Straten-1/+5
2023-02-24Rename many interner functions.Nicholas Nethercote-1/+1
(This is a large commit. The changes to `compiler/rustc_middle/src/ty/context.rs` are the most important ones.) The current naming scheme is a mess, with a mix of `_intern_`, `intern_` and `mk_` prefixes, with little consistency. In particular, in many cases it's easy to use an iterator interner when a (preferable) slice interner is available. The guiding principles of the new naming system: - No `_intern_` prefixes. - The `intern_` prefix is for internal operations. - The `mk_` prefix is for external operations. - For cases where there is a slice interner and an iterator interner, the former is `mk_foo` and the latter is `mk_foo_from_iter`. Also, `slice_interners!` and `direct_interners!` can now be `pub` or non-`pub`, which helps enforce the internal/external operations division. It's not perfect, but I think it's a clear improvement. The following lists show everything that was renamed. slice_interners - const_list - mk_const_list -> mk_const_list_from_iter - intern_const_list -> mk_const_list - substs - mk_substs -> mk_substs_from_iter - intern_substs -> mk_substs - check_substs -> check_and_mk_substs (this is a weird one) - canonical_var_infos - intern_canonical_var_infos -> mk_canonical_var_infos - poly_existential_predicates - mk_poly_existential_predicates -> mk_poly_existential_predicates_from_iter - intern_poly_existential_predicates -> mk_poly_existential_predicates - _intern_poly_existential_predicates -> intern_poly_existential_predicates - predicates - mk_predicates -> mk_predicates_from_iter - intern_predicates -> mk_predicates - _intern_predicates -> intern_predicates - projs - intern_projs -> mk_projs - place_elems - mk_place_elems -> mk_place_elems_from_iter - intern_place_elems -> mk_place_elems - bound_variable_kinds - mk_bound_variable_kinds -> mk_bound_variable_kinds_from_iter - intern_bound_variable_kinds -> mk_bound_variable_kinds direct_interners - region - intern_region (unchanged) - const - mk_const_internal -> intern_const - const_allocation - intern_const_alloc -> mk_const_alloc - layout - intern_layout -> mk_layout - adt_def - intern_adt_def -> mk_adt_def_from_data (unusual case, hard to avoid) - alloc_adt_def(!) -> mk_adt_def - external_constraints - intern_external_constraints -> mk_external_constraints Other - type_list - mk_type_list -> mk_type_list_from_iter - intern_type_list -> mk_type_list - tup - mk_tup -> mk_tup_from_iter - intern_tup -> mk_tup
2023-02-20:arrow_up: rust-analyzerLaurențiu Nicola-937/+1784
2023-02-13:arrow_up: rust-analyzerLaurențiu Nicola-8623/+9589
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-2/+2
2023-01-09:arrow_up: rust-analyzerarcnmx-5340/+12834
Merge commit '368e0bb32f1178cf162c2ce5f7e10b7ae211eb26'
2022-11-23:arrow_up: rust-analyzerLaurențiu Nicola-836/+1884
2022-11-09Rollup merge of #104211 - lnicola:rust-analyzer-2022-11-09, r=lnicolaMichael Goulet-367/+1137
:arrow_up: rust-analyzer r? ``@ghost``
2022-11-09:arrow_up: rust-analyzerLaurențiu Nicola-367/+1137
2022-11-09Rollup merge of #103919 - nnethercote:unescaping-cleanups, r=matkladDylan DPC-4/+2
Unescaping cleanups Some code improvements, and some error message improvements. Best reviewed one commit at a time. r? ````@matklad````
2022-11-05Remove `unescape_byte_literal`.Nicholas Nethercote-4/+2
It's easy to just use `unescape_literal` + `byte_from_char`.
2022-11-01:arrow_up: rust-analyzerLaurențiu Nicola-234/+608
2022-10-26:arrow_up: rust-analyzerLaurențiu Nicola-953/+1374
2022-10-18:arrow_up: rust-analyzerLaurențiu Nicola-1511/+2972
2022-10-11rename rustc_allocator_nounwind to rustc_nounwindRalf Jung-1/+1
2022-10-11:arrow_up: rust-analyzerLaurențiu Nicola-1047/+2825
2022-10-02Fix duplicate usage of `a` article.Petr Portnov-2/+2
This fixes a typo first appearing in #94624 in which test-macro diagnostic uses "a" article twice. Since I searched sources for " a a " sequences, I also fixed the same issue in a few source files where I found it. Signed-off-by: Petr Portnov <gh@progrm-jarvis.ru>
2022-09-27rustc_typeck to rustc_hir_analysislcnr-4/+4
2022-09-20:arrow_up: rust-analyzerLaurențiu Nicola-594/+1526
2022-09-13:arrow_up: rust-analyzerLaurențiu Nicola-143/+519
2022-09-06:arrow_up: rust-analyzerLaurențiu Nicola-828/+2817
2022-09-01Auto merge of #100210 - mystor:proc_macro_diag_struct, r=eddybbors-55/+4
proc_macro/bridge: send diagnostics over the bridge as a struct This removes some RPC when creating and emitting diagnostics, and simplifies the bridge slightly. After this change, there are no remaining methods which take advantage of the support for `&mut` references to objects in the store as arguments, meaning that support for them could technically be removed if we wanted. The only remaining uses of immutable references into the store are `TokenStream` and `SourceFile`. r? `@eddyb`
2022-08-30:arrow_up: rust-analyzerLaurențiu Nicola-686/+1820
2022-08-23:arrow_up: rust-analyzerLaurențiu Nicola-509/+1959
2022-08-16:arrow_up: rust-analyzerLaurențiu Nicola-5086/+1772
2022-08-09:arrow_up: rust-analyzerLaurențiu Nicola-231/+1386
2022-08-06proc_macro/bridge: send diagnostics over the bridge as a structNika Layzell-55/+4
This removes some RPC when creating and emitting diagnostics, and simplifies the bridge slightly. After this change, there are no remaining methods which take advantage of the support for `&mut` references to objects in the store as arguments, meaning that support for them could technically be removed if we wanted. The only remaining uses of immutable references into the store are `TokenStream` and `SourceFile`.
2022-08-02:arrow_up: rust-analyzerLaurențiu Nicola-228/+744
2022-07-26Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ↵Amos Wenger-210/+617
ra-sync-and-pms-component