Skip to content
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

Figure out a different way to allow crate-level and directory-level modules #1277

Closed
brson opened this issue Dec 9, 2011 · 7 comments
Closed
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)

Comments

@brson
Copy link
Contributor

brson commented Dec 9, 2011

The solution implemented in #1072 causes lots of confusion. Let's revert it and implement something else.

@marijnh
Copy link
Contributor

marijnh commented Dec 9, 2011

How about simply making it an attribute?

#[toplevel_module = "std.rs"];
mod something {
  #[toplevel_module = "something.rs"];
  /* ... */
}

@brson
Copy link
Contributor Author

brson commented Dec 9, 2011

I'm ok with an attribute, but I recall that last time I discussed it with pcwalton we concluded this should be a proper part of the language.

@graydon
Copy link
Contributor

graydon commented Feb 15, 2012

I'm actually ok with the structure we have now. It's a little confusing, but not deeply so, and I think most other forms of additional indirection will just make the confusion worse.

@brson
Copy link
Contributor Author

brson commented Apr 1, 2012

I think the way directory mods work now is fine and isn't likely to be surprising. I've seen the implicit crate mod be confusing several times now. rovar on IRC described seeing a "multiple 'main' function" error, which happens when you have file foo.rc include the line mod foo;

A potential way to solve this is by removing the distinction between .rc and .rs files. There are very few differences between the two and combining them would eliminate more than one source of confusion.

I think that if you allow filesystem-based mod declarations like those in .rc files in .rs files then .rc is redundant.

@brson
Copy link
Contributor Author

brson commented Apr 1, 2012

I think the conclusion I drew there is not quite true.

@graydon
Copy link
Contributor

graydon commented Apr 11, 2012

I'm warming to #2176. I'd close this as redundant with it, and just do that.

@catamorphism
Copy link
Contributor

Closing, see #2176.

bjorn3 added a commit to bjorn3/rust that referenced this issue Oct 23, 2022
Implement a couple of portable simd intrinsics
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
* Restore `rintf*` intrinsics

* Remove negative tests

* Restore `nearbyintf*` intrinsics

* Remove negative tests

* Add tests for `rintf*` and `nearbyintf*`

* Require `diff` to be [0, 0.5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)
Projects
None yet
Development

No branches or pull requests

4 participants