aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
Commit message (Collapse)AuthorAgeFilesLines
* Use `original_file_range` in `TestDB`Jonas Schievink2020-12-081-9/+3
|
* Add test for `$crate` in builtin macrosJonas Schievink2020-12-081-0/+28
| | | | Fixes #6716
* Handle macros in `TestDB::check_diagnostics`Jonas Schievink2020-12-081-2/+9
|
* Escape string literals in Attr::from_srcLukas Wirth2020-12-082-12/+6
|
* Replace Arc<[str]> with String in attr::DocumentationLukas Wirth2020-12-071-2/+2
|
* Keep doc attribute orderLukas Wirth2020-12-071-14/+26
|
* Remove raw pre and suffixes from string attr literalsLukas Wirth2020-12-071-2/+5
|
* Remove hir_def/docs.rs moduleLukas Wirth2020-12-073-83/+22
|
* Remove documentation queryLukas Wirth2020-12-073-51/+19
|
* Don't insert blank lines between doc attributesLukas Wirth2020-12-071-11/+11
|
* Make `compile_error!` message match upstream rustcJonas Schievink2020-12-031-1/+1
| | | | It only consists of the argument passed to it
* Fix proc macro token mappingJonas Schievink2020-12-031-2/+2
|
* Make `compile_error!` lazy and emit a diagnosticJonas Schievink2020-12-031-0/+6
|
* Give better diagnostic if `OUT_DIR` is unsetJonas Schievink2020-12-031-0/+3
|
* Update/Fix testsJonas Schievink2020-12-031-4/+15
|
* Propagate eager expansion errorsJonas Schievink2020-12-032-17/+54
|
* Test macro diagnostics in body loweringJonas Schievink2020-12-021-0/+41
|
* Merge #6698bors[bot]2020-12-021-2/+5
|\ | | | | | | | | | | | | | | | | | | | | | | 6698: Attach macro expansion errors to the right file r=jonas-schievink a=jonas-schievink Previously it attached them to the result of the macro expansion (or, if no result was produced, to the file containing the invocation). Always use the file containing the invocation. This doesn't seem to have any observable difference, but seems better in theory. bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * Attach macro expansion errors to the right fileJonas Schievink2020-12-021-2/+5
| |
* | Merge #6697bors[bot]2020-12-022-1/+22
|\ \ | |/ |/| | | | | | | | | | | 6697: Don't discard PathKind::Abs information in lower_use::convert_path r=matklad a=Veykril Fixes #6694 Co-authored-by: Lukas Wirth <[email protected]>
| * Don't discard PathKind::Abs information in lower_use::convert_pathLukas Wirth2020-12-022-1/+22
| |
* | Emit unresolved proc macro errorsJonas Schievink2020-12-012-9/+28
| |
* | Emit macro diagnostics when lowering bodiesJonas Schievink2020-11-304-27/+68
|/
* More accurately place proc-macro diagnosticJonas Schievink2020-11-272-4/+42
|
* Publish diagnostics for macro expansion errorsJonas Schievink2020-11-273-4/+137
|
* Don't store `SyntaxNodePtr` in `CrateDefMap`Jonas Schievink2020-11-262-8/+7
| | | | It is volatile across reparses and makes incrementality worse.
* Test def map invalidation with #[cfg] below changeJonas Schievink2020-11-261-0/+6
|
* Improve autoimports on completion speedKirill Bulatov2020-11-241-5/+77
| | | | | * Ignore modules eaferly * Do less completion string rendering
* Cleanup APIAleksey Kladov2020-11-061-10/+11
|
* Don't stack overflow on circular modulesAleksey Kladov2020-11-044-18/+62
| | | | closes #6453
* Merge #6435bors[bot]2020-11-031-2/+15
|\ | | | | | | | | | | | | | | 6435: Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot. r=matklad a=rickvanprim Updates `module_resolution_relative_path_outside_root` test to check valid paths outside of the root, by moving the root to a subpath so that paths outside of it are possible. If this would be more appropriate as a new test, or if the original check for an invalid path should be left, I'm happy to update. Co-authored-by: James Leitch <[email protected]>
| * Feedback.James Leitch2020-11-021-1/+1
| |
| * Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot.James Leitch2020-11-021-2/+15
| |
* | Remove more unreachable pubsAleksey Kladov2020-11-021-2/+2
| |
* | Deny unreachable-pubAleksey Kladov2020-11-024-20/+20
| | | | | | | | | | | | | | | | It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034.
* | Handle #![cfg] in crate rootJonas Schievink2020-10-262-2/+22
|/
* Fix name of InactiveCode diagnosticJonas Schievink2020-10-231-1/+1
|
* Diagnose #[cfg]s in bodiesJonas Schievink2020-10-237-94/+213
|
* Merge #6324bors[bot]2020-10-235-23/+75
|\ | | | | | | | | | | | | | | | | 6324: Improve #[cfg] diagnostics r=jonas-schievink a=jonas-schievink Unfortunately I ran into https://github.com/rust-analyzer/rust-analyzer/issues/4058 while testing this on https://github.com/nrf-rs/nrf-hal/, so I didn't see much of it in action yet, but it does seem to work. Co-authored-by: Jonas Schievink <[email protected]> Co-authored-by: Jonas Schievink <[email protected]>
| * Use format_toJonas Schievink2020-10-231-4/+3
| | | | | | | | Co-authored-by: Aleksey Kladov <[email protected]>
| * Emit better #[cfg] diagnosticsJonas Schievink2020-10-225-21/+74
| |
* | Merge #6307bors[bot]2020-10-211-2/+45
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | 6307: Add whitelist of safe intrinsics r=frazar a=frazar This PR should fix #5996, where intrinsic operations where all marked as unsafe. I'm rather new to this codebase, so I might be doing something *very* wrong. Please forgive me! In particular, I'm not sure how to "check that we are in extern `rust-intrinsics`" as mentioned [in this comment](https://github.com/rust-analyzer/rust-analyzer/issues/5996#issuecomment-709234802). Co-authored-by: Francesco Zardi <[email protected]>
| * Refactor is_intrinsic_fn_unsafe() and make it privateFrancesco Zardi2020-10-211-39/+42
| |
| * Move safe intrinsic testsFrancesco Zardi2020-10-211-20/+0
| |
| * Add whitelist of safe intrinsicsFrancesco Zardi2020-10-212-2/+62
| |
* | More detailed messageJonas Schievink2020-10-201-1/+1
| |
* | Rename UnconfiguredCode -> InactiveCodeJonas Schievink2020-10-202-4/+4
| |
* | Add a (hint) diagnostic for unconfigured itemsJonas Schievink2020-10-204-1/+70
| |
* | Rename declaration_name -> display_nameAleksey Kladov2020-10-202-8/+4
| | | | | | | | | | | | | | | | Declaration names sounds like a name of declaration -- something you can use for analysis. It empathically isn't, and is just a label displayed in various UI. It's important not to confuse the two, least we accidentally mix semantics with UI (I believe, there's already a case of this in the FamousDefs at least).
* | Add descriptions for diagnostics parseable by xtaskIgor Aleksanov2020-10-191-0/+9
|/