Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Handle macro error diagnostics #886

Merged
merged 2 commits into from
Jun 4, 2018
Merged

Conversation

alexheretic
Copy link
Member

Produce useful diagnostics from macro messages.

Previously the file reference for macro diagnostics were coming out as something like ./<vec macros>. This meant the error doesn't properly show up at the site in source, and suggestions are not usable.

Test Case

fn main() {
    let mut out = String::new();
    write!(out, "{}", 123);
}

Before

before

This is quite annoying in large code bases, where is this error?!

After

after

Resolves #183
Resolves #638

@alexheretic
Copy link
Member Author

Btw test success is waiting on rust-lang/rustfmt#2748

@alexheretic
Copy link
Member Author

Ok I just included rustfmt update

@nrc nrc merged commit 62779fe into rust-lang:master Jun 4, 2018
@nrc
Copy link
Member

nrc commented Jun 4, 2018

This is probably somewhere rustc could do better so we don't need to hack around it here, but I don't know the constraints there.

Thanks for the PR!

@alexheretic alexheretic deleted the macro-diagnostics branch June 4, 2018 09:51
bors added a commit that referenced this pull request Feb 5, 2019
…r=Xanewok

Bump tokio-timer from 0.2.9 to 0.2.10

Bumps [tokio-timer](https://github.com/tokio-rs/tokio) from 0.2.9 to 0.2.10.
<details>
<summary>Commits</summary>

- [`a69aca8`](tokio-rs/tokio@a69aca8) Bump tokio-timer v0.2.10 ([#886](https://github-redirect.dependabot.com/tokio-rs/tokio/issues/886))
- [`13c9618`](tokio-rs/tokio@13c9618) tokio-timer: Fix multi reset DelayQueue bug ([#871](https://github-redirect.dependabot.com/tokio-rs/tokio/issues/871))
- [`61d4aa9`](tokio-rs/tokio@61d4aa9) docs: replace `Prepends` with `Appends` ([#882](https://github-redirect.dependabot.com/tokio-rs/tokio/issues/882))
- [`9d6d142`](tokio-rs/tokio@9d6d142) Bump tokio-sync v0.1.1 ([#881](https://github-redirect.dependabot.com/tokio-rs/tokio/issues/881))
- [`95b0eec`](tokio-rs/tokio@95b0eec) sync: bounded channel can not have 0 size ([#879](https://github-redirect.dependabot.com/tokio-rs/tokio/issues/879))
- [`e1a07ce`](tokio-rs/tokio@e1a07ce) threadpool: update crossbeam dependencies ([#874](https://github-redirect.dependabot.com/tokio-rs/tokio/issues/874))
- See full diff in [compare view](tokio-rs/tokio@tokio-timer-0.2.9...tokio-timer-0.2.10)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=tokio-timer&package-manager=cargo&previous-version=0.2.9&new-version=0.2.10)](https://dependabot.com/compatibility-score.html?dependency-name=tokio-timer&package-manager=cargo&previous-version=0.2.9&new-version=0.2.10)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants