Commit Graph

80 Commits

Author SHA1 Message Date
Yoshua Wuyts
b4970b0fe9 Add suggestion for failed path resolution
This adds https://github.com/rust-analyzer/rust-analyzer/issues/3245 as an inline help text for when path resolution fails.
2020-02-23 15:51:32 +01:00
Kirill Bulatov
f6816c253b Update versions 2020-02-18 16:12:40 +02:00
Kirill Bulatov
eceaf94f19 More manual clippy fixes 2020-02-18 16:12:37 +02:00
Kirill Bulatov
b8ddcb0652 Run cargo +nightly fix --clippy -Z unstable-options 2020-02-18 16:03:08 +02:00
Kirill Bulatov
e29dbdb139 Simplify the command execution 2020-02-18 00:38:01 +02:00
Kirill Bulatov
67d30312d0 Simplify the code further 2020-02-18 00:18:26 +02:00
Kirill Bulatov
addb61df36 Idempotent location and installation of rust src 2020-02-18 00:07:15 +02:00
Kirill Bulatov
5cea8a37b7 Install rust-src when it is not found 2020-02-17 23:40:34 +02:00
Aleksey Kladov
0bfebb8b20 Make AtomicX type resolve again 2020-02-14 19:33:39 +01:00
Adam Bratschi-Kaye
6f2cab1368
Add error context to failures in ra_project_model using anyhow crate (#3119)
Add error context to failures in ra_project_model using anyhow crate
2020-02-13 11:10:50 +01:00
Aleksey Kladov
5a71eb8749 More specific error if rustc --print sysroot fails 2020-02-10 17:04:18 +01:00
Kirill Bulatov
78092c7c66 Apply the reviews suggestions 2020-02-05 12:47:28 +02:00
Aleksey Kladov
c2e3dba8cb Add a FIXME note 2020-01-30 18:01:38 +01:00
Edwin Cheng
c32be4bfe8 Ignore illform node id from metadata 2020-01-28 17:08:17 +08:00
Emil Lauridsen
d6da18e99d Address nit 2020-01-10 22:41:52 +01:00
Emil Lauridsen
1d1eea217d Slightly more robust cargo watcher root search 2020-01-10 22:10:26 +01:00
Aleksey Kladov
cf5bdf464c
Merge pull request #2732 from detrumi/cargo-toml-not-found-message-toggle
Flag to hide cargo.toml not found error
2020-01-09 15:16:39 +01:00
Aleksey Kladov
4223760a7b Better error message
closes #2775
2020-01-09 11:25:44 +01:00
Wilco Kusee
11caebe6ce
Remove unneeded Box::new
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-01-08 17:22:08 +01:00
Wilco Kusee
738d5a7ec2
Derive debug 2020-01-08 17:21:19 +01:00
Wilco Kusee
003620f0d6
Use downcasting for CargoTomlNotFoundError 2020-01-08 14:06:08 +01:00
Wilco Kusee
e7bb82c3a4
Allow disabling Cargo.toml not found error 2020-01-03 15:04:54 +01:00
Wilco Kusee
6c321d7318
Move error to new file 2020-01-03 14:34:16 +01:00
Wilco Kusee
2202891221
Split errors into WorkspaceError enum 2020-01-03 14:04:46 +01:00
Edwin Cheng
4ee3c5202e Only add features flags if non-empty 2019-12-24 00:27:48 +08:00
Aleksey Kladov
f720855e1e Use all-features by default 2019-12-14 17:05:12 +01:00
oxalica
af4eb26645
Support setting cargo features 2019-12-13 18:16:34 +08:00
bors[bot]
b0581c2403
Merge #2381
2381: Add proc-macro crate type handling r=JasperDeSutter a=JasperDeSutter

Resolves the libproc_macro crate in crates that are the proc-macro type.
This doesn't seem the ideal implementation though, since the compiler still requires you to write `extern crate proc_macro;` (even in 2018 edition).

Co-authored-by: JasperDeSutter <jasper.desutter@gmail.com>
2019-11-24 15:59:47 +00:00
JasperDeSutter
6a8b4f873a add proc-macro crate type handling 2019-11-24 16:55:56 +01:00
Marco Groppo
e3f8e7d13d Add alloc to the sysroot 2019-11-24 13:19:47 +01:00
Aleksey Kladov
0861ac061e Cleanup errors 2019-11-22 14:08:18 +03:00
Aleksey Kladov
2c48fa087b Add support for environment to CrateGraph 2019-11-22 13:57:25 +03:00
Aleksey Kladov
7e2f4b30db Disable doctests 2019-11-17 18:35:05 +03:00
Metabaron
53b9c1c8d8 return Error instead of panicking in from_cargo_metadata 2019-11-12 12:01:13 +01:00
Metabaron
b69738590c Implement FromStr for enum Edition 2019-11-12 12:01:13 +01:00
Matthias Einwag
d634364462 Overwrite the prelude with one defined in a later dependency
This removes the special casing for the "core" prelude.
Whenever a later dependency also exports a prelude, it will replace
the formerly imported prelude.  The utilized prelude then depends
purely on import order.
2019-11-10 13:15:47 -08:00
Matthias Einwag
799903ba16 Resolve core types
This adds support for completion and goto definition of
types defined within the "core" crate. The core crate is
added as a dependency to each crate in the project.

The core crate exported it's own prelude. This caused
now all crates to inherit the core crates prelude instead
of the std crates. In order to avoid the problem the
prelude resolution has been changed to overwrite
an already resolved prelude if this was set to a crate
named core - in order to pick a better prelude like std.

Fixes #2199
2019-11-09 15:22:19 -08:00
kjeremy
e9bab85b65 Bump crates 2019-10-22 13:01:26 -04:00
Aleksey Kladov
857f419c9d hard-code nightly-only CFGs 2019-10-08 14:43:29 +03:00
Aleksey Kladov
355419d404 use slightly more idiomatic api for cfg 2019-10-08 14:22:49 +03:00
oxalica
c6303d9fee
Use raw cfgs in json project and fix typo 2019-10-05 20:55:27 +08:00
uHOOCCOOHu
1067a1c5f6
Read default cfgs from rustc 2019-10-03 02:28:03 +08:00
uHOOCCOOHu
d2ea776b8f
Enable CfgOptions test for workspace crates 2019-10-03 02:28:02 +08:00
Alexander Andreev
fdbd6bb11a Added test for check doc strings in crates.
#1856
2019-09-30 11:58:53 +03:00
Aleksey Kladov
ef2b84ddf1 introduce hir debugging infra
This is to make debugging rust-analyzer easier.

The idea is that `dbg!(krate.debug(db))` will print the actual, fuzzy
crate name, instead of precise ID. Debug printing infra is a separate
thing, to make sure that the actual hir doesn't have access to global
information.

Do not use `.debug` for `log::` logging: debugging executes queries,
and might introduce unneded dependencies to the crate graph
2019-09-09 12:32:16 +03:00
ivfranco
4854408f28 close #1763 2019-09-05 22:04:56 +08:00
Bastian Köcher
18c7a1ebe7 Make sysroot use RUST_SRC_PATH if set 2019-08-22 21:59:23 +02:00
Aleksey Kladov
7cd9b1dd7a don't load sysroot in most heavy tests 2019-08-19 15:41:18 +03:00
Aleksey Kladov
42ae888629 ⬆️ deps 2019-08-17 13:53:02 +03:00
Aleksey Kladov
34203256bf introduce ra_vfs_glob crate
It manages exclusion rules for the vfs crate
2019-08-06 14:28:31 +02:00