about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-10-16 23:58:05 +0200
committerGitHub <noreply@github.com>2023-10-16 23:58:05 +0200
commit347f7f3bf4d1b695ab988d27f057018de0808bfe (patch)
tree5f7987817b73e626bef4c9244326e3a7a863238c /compiler/rustc_errors/src/snippet.rs
parentd0ade3f1baf421d730d569b285bf717f34683f41 (diff)
parent414135d522332016504b4fa5de57ce4cce503c74 (diff)
downloadrust-347f7f3bf4d1b695ab988d27f057018de0808bfe.tar.gz
rust-347f7f3bf4d1b695ab988d27f057018de0808bfe.zip
Rollup merge of #116805 - Nilstrieb:onunimplemented-std-core-alloc-whatever-who-cares, r=compiler-errors
Make `rustc_onunimplemented` export path agnostic

This makes it so that all the matchers that match against paths use the definition path instead of the export path. This removes all duplication around `std`/`alloc`/`core`.

This is not necessarily optimal because we now depend on internal implementation details like `core::ops::control_flow::ControlFlow`, which is not very nice and probably not acceptable for a stable `on_unimplemented`.

An alternative would be to just string-replace normalize away `alloc`/`core` to `std` as a special case, keeping the export paths but making it so that we're still fully standard library flavor agnostic.

Looking at the diff, I'm starting to think that some simple string replacement would go a long way towards fixing the problem of duplication while keeping export paths...

What do you prefer?

Also `@weiznich` for your thoughts about the stable version.

r? compiler-errors
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions