Skip to content

Commit f8c8493

Browse files
violations_coverage
1 parent 29628ae commit f8c8493

File tree

18 files changed

+17
-7
lines changed

18 files changed

+17
-7
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run tests and validate version
1+
name: Tests, doc tests, MIRI, violations coverage
22

33
on:
44
push:

src/lib.rs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ extern crate alloc;
6464
///
6565
/// Zero arguments. The given expression (which evaluates to the function to be called) is `unsafe.`
6666
/// ```compile_fail
67-
#[doc = include_str!("../violation_coverage/unsafe_fn/zero_args/fn_expression.rs")]
67+
#[doc = include_str!("../violations_coverage/unsafe_fn/zero_args/fn_expression.rs")]
6868
/// ```
6969
/// ```compile_fail
70-
#[doc = include_str!("../violation_coverage/unsafe_fn/some_args/fn_expression.rs")]
70+
#[doc = include_str!("../violations_coverage/unsafe_fn/some_args/fn_expression.rs")]
7171
/// ```
7272
/// ```compile_fail
73-
#[doc = include_str!("../violation_coverage/unsafe_fn/some_args/arg.rs")]
73+
#[doc = include_str!("../violations_coverage/unsafe_fn/some_args/arg.rs")]
7474
/// ```
7575
#[macro_export]
7676
macro_rules! unsafe_fn {
@@ -98,19 +98,19 @@ macro_rules! unsafe_fn {
9898
// - RUSTDOCFLAGS="..." cargo +nightly doc ...
9999
//
100100
/// ```compile_fail,E0133
101-
#[doc = include_str!("../violation_coverage/unsafe_fn/zero_args/fn_expression.rs")]
101+
#[doc = include_str!("../violations_coverage/unsafe_fn/zero_args/fn_expression.rs")]
102102
/// ```
103103
#[cfg(doctest)]
104104
pub const _: () = {};
105105

106106
/// ```compile_fail,E0133
107-
#[doc = include_str!("../violation_coverage/unsafe_fn/some_args/fn_expression.rs")]
107+
#[doc = include_str!("../violations_coverage/unsafe_fn/some_args/fn_expression.rs")]
108108
/// ```
109109
#[cfg(doctest)]
110110
pub const _: () = {};
111111

112112
/// ```compile_fail,E0133
113-
#[doc = include_str!("../violation_coverage/unsafe_fn/some_args/arg.rs")]
113+
#[doc = include_str!("../violations_coverage/unsafe_fn/some_args/arg.rs")]
114114
/// ```
115115
#[cfg(doctest)]
116116
pub const _: () = {};
@@ -160,6 +160,16 @@ macro_rules! unsafe_static_set {
160160
}
161161
}
162162
}};
163+
// @TODO
164+
($static:path, ( $( $suffix:tt )* ) $val:expr) => {{
165+
if false {
166+
// Pretend to copy the variable, even if it's not Copy
167+
//let var =
168+
169+
} else {
170+
171+
}
172+
}}
163173
}
164174

165175
/// Deref a pointer (either `const` or `mut`) and yield a read-only reference.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

violation_coverage/format_files/src/bin/unsafe_fn_some_args_arg.rs renamed to violations_coverage/format_files/src/bin/unsafe_fn_some_args_arg.rs

File renamed without changes.

violation_coverage/format_files/src/bin/unsafe_fn_some_args_fn_expression.rs renamed to violations_coverage/format_files/src/bin/unsafe_fn_some_args_fn_expression.rs

File renamed without changes.

0 commit comments

Comments
 (0)