aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Revert #2230Aleksey Kladov2019-11-143-13/+25
|/ / | | | | | | | | Looks like autocfg tries to do slightly more than we need (see #2231), so let's stick with minimal home-grown solution.
* | Merge #2235bors[bot]2019-11-147-100/+156
|\ \ | | | | | | | | | | | | | | | | | | | | | 2235: Handle macro-generated expressions slightly less wrong r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Handle macro-generated expressions slightly less wrongAleksey Kladov2019-11-146-48/+62
| | |
| * | Move expansion to ExpanderAleksey Kladov2019-11-142-27/+41
| | |
| * | Move parse_path to ExpanderAleksey Kladov2019-11-142-10/+10
| | |
| * | Expansion stack scaffoldAleksey Kladov2019-11-142-8/+38
| | |
| * | Add Expader::to_sourceAleksey Kladov2019-11-142-10/+8
| | |
| * | Move original_file to ExpanderAleksey Kladov2019-11-142-9/+11
| | |
| * | Rename MacroResolver -> ExpanderAleksey Kladov2019-11-143-29/+25
| | |
| * | Move current file to MacroResolverAleksey Kladov2019-11-143-21/+27
| | |
| * | Reduce visibilityAleksey Kladov2019-11-141-5/+1
| | |
* | | Merge #2234bors[bot]2019-11-141-14/+9
|\| | | | | | | | | | | | | | | | | | | | | | | 2234: Normalize data r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Normalize dataAleksey Kladov2019-11-141-14/+9
|/ / | | | | | | No need to store derivable info
* | Merge #2232bors[bot]2019-11-137-29/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2232: Use anyhow::Result in xtask, add contexts r=matklad a=killercup This builds on #2231 but was actually done before that. You see, the cause for #2231 was that I got this error message: Error: Error { kind: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }) } Just switching to `anyhow::Result` got me stack traces (when setting `RUST_LIB_BACKTRACE=1`) that at least showed stack backtrace: 0: std::backtrace::Backtrace::create 1: std::backtrace::Backtrace::capture 2: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from 3: xtask::install_server 4: xtask::install 5: xtask::main 6: std::rt::lang_start::{{closure}} 7: std::panicking::try::do_call 8: __rust_maybe_catch_panic 9: std::rt::lang_start_internal 10: std::rt::lang_start 11: main With the added contexts (not at all exhaustive), the error became Error: install server Caused by: 0: build AutoCfg with target directory 1: No such file or directory (os error 2) Since anyhow is such a small thing (no new transitive dependencies!), and in general gives you `Result<T, Box<dyn Error>>` on steroids, I think this a nice small change. The only slightly annoying thing was to replace all the `Err(format!(…))?` calls (haven't even looked at whether we can make it support wrapping strings though), but the `bail!` macro is shorter anyway :) Co-authored-by: Pascal Hertleif <[email protected]>
| * | Use anyhow::Result in xtask, add contextsPascal Hertleif2019-11-137-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This builds on #2231 but was actually done before that. You see, the cause for #2231 was that I got this error message: Error: Error { kind: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }) } Just switching to `anyhow::Result` got me stack traces (when setting `RUST_LIB_BACKTRACE=1`) that at least showed stack backtrace: 0: std::backtrace::Backtrace::create 1: std::backtrace::Backtrace::capture 2: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from 3: xtask::install_server 4: xtask::install 5: xtask::main 6: std::rt::lang_start::{{closure}} 7: std::panicking::try::do_call 8: __rust_maybe_catch_panic 9: std::rt::lang_start_internal 10: std::rt::lang_start 11: main With the added contexts (not at all exhaustive), the error became Error: install server Caused by: 0: build AutoCfg with target directory 1: No such file or directory (os error 2) Since anyhow is such a small thing (no new transitive dependencies!), and in general gives you `Result<T, Box<dyn Error>>` on steroids, I think this a nice small change. The only slightly annoying thing was to replace all the `Err(format!(…))?` calls (haven't even looked at whether we can make it support wrapping strings though), but the `bail!` macro is shorter anyway :)
* | | Merge #2231bors[bot]2019-11-131-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | 2231: Allow usage of CARGO_TARGET_DIR env var r=matklad a=killercup Co-authored-by: Pascal Hertleif <[email protected]>
| * | Allow usage of CARGO_TARGET_DIR env varPascal Hertleif2019-11-131-1/+2
|/ /
* | Merge #2230bors[bot]2019-11-133-25/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | 2230: Use autocfg to determine rust version r=matklad a=kjeremy Fixes #2229 Co-authored-by: kjeremy <[email protected]>
| * | Use autocfg to determine rust versionkjeremy2019-11-133-25/+12
|/ /
* | Merge #2228bors[bot]2019-11-131-30/+30
|\ \ | | | | | | | | | | | | | | | | | | | | | 2228: Update Crates r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | Update CratesJeremy Kolb2019-11-131-30/+30
|/ /
* | Merge #2226bors[bot]2019-11-134-71/+132
|\ \ | | | | | | | | | | | | | | | | | | | | | 2226: Use strongly-typed ast building for early-return assist r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Make make:: builders slightly more convenientAleksey Kladov2019-11-132-9/+12
| | |
| * | Use strongly-typed ast building for early-return assistAleksey Kladov2019-11-132-45/+102
| | |
| * | Add a bit of typesAleksey Kladov2019-11-131-5/+5
| | |
| * | Minor cleanupAleksey Kladov2019-11-132-20/+21
| | |
* | | Merge #2225bors[bot]2019-11-137-70/+55
|\| | | | | | | | | | | | | | | | | | | | | | | 2225: Reduce duplication between uncertain floats & ints r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Reduce duplication between uncertain floats & intsAleksey Kladov2019-11-137-70/+55
|/ /
* | Merge #2223bors[bot]2019-11-128-732/+765
|\ \ | | | | | | | | | | | | | | | | | | | | | 2223: Move expression lowering to hir_def r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Add helpful pointer to module docsAleksey Kladov2019-11-121-0/+2
| | |
| * | Drop obsolete commentAleksey Kladov2019-11-121-4/+0
| | |
| * | Move expression lowering to hir_defAleksey Kladov2019-11-127-732/+767
| | |
* | | Merge #2217bors[bot]2019-11-123-11/+23
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 2217: Implement FromStr for enum Edition r=matklad a=clemarescx Just did this as I came across the comment in the code asking for implementing `std::str::FromStr` for `input::Edition`. Not sure what was meant by "proper error handling" though, `panic!` with a descriptive message might not be it :sweat_smile: Co-authored-by: Metabaron <[email protected]>
| * | Fix unused importMetabaron2019-11-121-1/+1
| | |
| * | return Error instead of panicking in from_cargo_metadataMetabaron2019-11-122-10/+16
| | |
| * | Implement FromStr for enum EditionMetabaron2019-11-123-8/+14
| | |
* | | Merge #2222bors[bot]2019-11-125-28/+19
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2222: Remove owner from Body r=matklad a=matklad cc @flodiebold I do this so that it's easier to move lowering code to another crate (owner is the only thing that tethers Body to the rest of the code), but it's interesting that this is a net reduction of lines. I think this might be considered an evidence that it's a good idea to not add "parent pointers" / parent ids to data structures, and instead add them to `ctx` objects which are used when building data structures bors r+ Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Remove owner from BodyAleksey Kladov2019-11-125-28/+19
|/ / /
* | | Merge #2221bors[bot]2019-11-1213-528/+647
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 2221: Disallow regressing crate docs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Disallow regressing crate docsAleksey Kladov2019-11-123-10/+49
| | |
| * | Move definition of exprs to hir_defAleksey Kladov2019-11-1210-518/+598
|/ /
* | Minor refactoringAleksey Kladov2019-11-122-21/+32
| |
* | Minor cleanupAleksey Kladov2019-11-126-47/+44
| |
* | Merge #2216bors[bot]2019-11-123-0/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | 2216: Implement postfix completions feature flag r=matklad a=chmln Resolves #2186 Co-authored-by: Greg <[email protected]>
| * | fix typoGreg2019-11-121-1/+1
| | |
| * | Implement postfix completions feature flagGreg2019-11-123-0/+7
|/ /
* | Merge #2214bors[bot]2019-11-111-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | 2214: Fix snap missing node path r=matklad a=mkucijan #2045 Co-authored-by: mkucijan <[email protected]>
| * | Add '--scripts-prepend-node-pat' to npm run packagemkucijan2019-11-111-1/+1
|/ /
* | Merge #2213bors[bot]2019-11-118-21/+32
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2213: Hir generic param r=flodiebold a=matklad r? @flodiebold This should make the life of IDE easier: before, it got `GenericParam(u32)` which was of questionable utility. Now, it's a proper code_model type, so it can gain `source`, `name`, `module` and all the other hir methods, should the IDE need them. Moreover, IDE now doesn't care about internal representation of generic param, which seems like a long-term win. The problem is, of course, that we now have to types named `GenericParam` in hir: this code_model type, and an internal type with an index which doesn't know about the parent. I think it's fine for the time being, but, after we finish cratefication of hir, this local `GenericParam` should move to `hir_def` or `hir_ty`, and *maybe* restrucured as `ParamId / PramData` pair. Co-authored-by: Aleksey Kladov <[email protected]>
| * | Introduce hir::GenericParamAleksey Kladov2019-11-114-9/+19
| | | | | | | | | | | | Unlike existing hir::GenericParams, this is a global ID.