diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-01-24 20:05:19 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-02-15 03:51:47 +0100 |
| commit | 82ec72391f36579b5bc8f04c3cb55cf06020fca1 (patch) | |
| tree | 8e7ed45e1ce48369677b06bf7742f1f2705c93e3 /src/librustc_data_structures | |
| parent | f47ec2ad5b6887b3d400aee49e2294bd27733d18 (diff) | |
Always emit an error for a query cycle
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index 08b453cf493..2bfb1b24a81 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -41,6 +41,12 @@ extern crate rustc_cratesio_shim; pub use rustc_serialize::hex::ToHex; +#[inline(never)] +#[cold] +pub fn cold_path<F: FnOnce() -> R, R>(f: F) -> R { + f() +} + #[macro_export] macro_rules! likely { ($e:expr) => { |
