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

Stop passing type descriptors to intrinsics #1981

Closed
marijnh opened this issue Mar 15, 2012 · 0 comments
Closed

Stop passing type descriptors to intrinsics #1981

marijnh opened this issue Mar 15, 2012 · 0 comments
Labels
A-codegen Area: Code generation C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Milestone

Comments

@marijnh
Copy link
Contributor

marijnh commented Mar 15, 2012

Intrinsics are the only functions left that take type descriptors. Most don't even use them, and those that do can have them passed explicitly. This depends on #1948 being solved first.

@ghost ghost assigned marijnh Mar 15, 2012
marijnh added a commit that referenced this issue Mar 21, 2012
marijnh added a commit that referenced this issue Mar 23, 2012
As per Graydon's request

Issue #1981
@marijnh marijnh removed their assignment Jun 16, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 27, 2022
Check usages in `ptr_arg`

fixes rust-lang#214
fixes rust-lang#1981
fixes rust-lang#3381
fixes rust-lang#6406
fixes rust-lang#6964

This does not take into account the return type of the function currently, so `(&Vec<_>) -> &Vec<_>` functions may still be false positives.

The name given for the type also has to match the real type name, so `type Foo = Vec<u32>` won't trigger the lint, but `type Vec = Vec<u32>` will. I'm not sure if this is the best way to handle this, or if a note about the actual type should be added instead.

changelog: Check if the argument is used in a way which requires the original type in `ptr_arg`
changelog: Lint mutable references in `ptr_arg`
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Fix direct call to drop a fat pointer to a structure with an unsized element. Join similar code that we had to build a reference to a place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

1 participant