Skip to content

Remove outdated info about nested block comments. Fixes #14767 #14800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2014
Merged

Remove outdated info about nested block comments. Fixes #14767 #14800

merged 1 commit into from
Jun 12, 2014

Conversation

reem
Copy link
Contributor

@reem reem commented Jun 10, 2014

According to #14767 and the grammar right above this documentation, nested comments are supported.

Comments in Rust code follow the general C++ style of line and block-comment forms,
with no nesting of block-comment delimiters.
Comments in Rust code follow the general C++ style of line and block-comment forms.
Nested comments are supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you tweak this a bit to say that nested block comments are supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

bors added a commit that referenced this pull request Jun 12, 2014
According to #14767 and the grammar right above this documentation, nested comments are supported.
@bors bors closed this Jun 12, 2014
@bors bors merged commit e5ebdb4 into rust-lang:master Jun 12, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…=Veykril

Expand more single ident macro calls upon item collection

Addresses rust-lang/rust-analyzer#14781 (comment)

I believe this (almost) brings the number of unresolved names back to pre-rust-lang#14781:

|r-a version|`analysis-stats compiler/rustc` (rust-lang/rust@69fef92) |
|---|---|
|pre-rust-lang#14781 (b069eb7) | exprs: 2747778, ??ty: 122236 (4%), ?ty: 107826 (3%), !ty: 728 |
| rust-lang#14781 (a7944a9) | exprs: 2713080, ??ty: 139651 (5%), ?ty: 114444 (4%), !ty: 730 |
| with this fix | exprs: 2747871, ??ty: 122237 (4%), ?ty: 108171 (3%), !ty: 676 |

(I haven't investigated on the increase in some numbers but hopefully not too much of a problem)

This is only a temporary solution. The core problem is that we haven't fully implemented the textual scope of legacy macros. For example, we *have been* failing to resolve `foo` in the following snippet, even before rust-lang#14781 or after this patch. As noted in a FIXME, we need a way to resolve names in textual scope without eager expansion during item collection.

```rust
//- /main.rs crate:main deps:lib
lib::mk_foo!();
const A: i32 = foo!();
             //^^^^^^ unresolved-macro-call

//- /lib.rs crate:lib
#[macro_export]
macro_rules! mk_foo {
    () => {
        macro_rules! foo { () => { 42 } }
    }
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants