2023-12-16 07:12:50 -06:00
|
|
|
error: dereferencing a reference to an uninhabited type would be undefined behavior
|
2024-04-04 12:52:55 -05:00
|
|
|
--> tests/ui/uninhabited_references.rs:5:23
|
2023-12-16 07:12:50 -06:00
|
|
|
|
|
|
|
|
LL | fn ret_uninh_ref() -> &'static std::convert::Infallible {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::uninhabited-references` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::uninhabited_references)]`
|
|
|
|
|
|
|
|
error: dereferencing a reference to an uninhabited type would be undefined behavior
|
2024-04-04 12:52:55 -05:00
|
|
|
--> tests/ui/uninhabited_references.rs:11:30
|
2023-12-16 07:12:50 -06:00
|
|
|
|
|
|
|
|
LL | fn $name(x: &$ty) -> &$ty {
|
|
|
|
| ^^^^
|
|
|
|
...
|
|
|
|
LL | ret_something!(id_never, !);
|
|
|
|
| --------------------------- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in the macro `ret_something` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: dereferencing a reference to an uninhabited type is undefined behavior
|
2024-04-04 12:52:55 -05:00
|
|
|
--> tests/ui/uninhabited_references.rs:12:14
|
2023-12-16 07:12:50 -06:00
|
|
|
|
|
|
|
|
LL | &*x
|
|
|
|
| ^^
|
|
|
|
...
|
|
|
|
LL | ret_something!(id_never, !);
|
|
|
|
| --------------------------- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in the macro `ret_something` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: dereferencing a reference to an uninhabited type is undefined behavior
|
2024-04-04 12:52:55 -05:00
|
|
|
--> tests/ui/uninhabited_references.rs:22:13
|
2023-12-16 07:12:50 -06:00
|
|
|
|
|
|
|
|
LL | let _ = *x;
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|