Skip to content

Commit 8ef1b64

Browse files
committed
mention that #![crate_name] is a mess
1 parent 640136e commit 8ef1b64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

text/3791-crate-attr.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ In the author's opinion, having source injected via this mechanism does not make
152152
# Unresolved questions
153153
[unresolved-questions]: #unresolved-questions
154154

155-
How should macros that give information about source code behave when used in this attribute? For example, `line!` does not seem to have an obvious behavior, and `column!` could either include or not include the surrounding `#![]`.
155+
- Is `--crate-name` equivalent to `--crate-attr=crate_name`? As currently implemented, the answer is no. Fixing this is hard; see https://github.com/rust-lang/rust/issues/91632 and https://github.com/rust-lang/rust/pull/108221#issuecomment-1435765434 (these do not directly answer why, but I am not aware of any documentation that does).
156+
157+
- How should macros that give information about source code behave when used in this attribute? For example, `line!` does not seem to have an obvious behavior, and `column!` could either include or not include the surrounding `#![]`.
156158

157159
Note this should not be construed to imply that `--crate-attr` uses a different file/module than the source or otherwise limits macros. `file!`, `include!`, `include_str!`, and `module_path!` should all behave the same as when written in source code.
158160

0 commit comments

Comments
 (0)