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

Fix type-parameterized object methods. #91

Closed
froystig opened this issue Jun 29, 2010 · 2 comments
Closed

Fix type-parameterized object methods. #91

froystig opened this issue Jun 29, 2010 · 2 comments
Labels
A-type-system Area: Type system

Comments

@froystig
Copy link
Contributor

See (XFAILed) run-pass/generic-obj.rs for sample testcase. A method that takes an argument whose type is a type-parameter of its enclosing object, e.g.

obj fooer[T]() { fn foo(T t) {} }

causes rustboot to get-element-pointer on something dynamically-sized during translation. Methods returning T to work fine, on the other hand.

@froystig
Copy link
Contributor Author

Issue #92 was fixed with 25a38ee, which means that the above test now compiles. But now it segfaults at runtime instead. This appears to happen when the fooer.foo()'s arguments are dropped (can be made to happen earlier if a copy on a T occurs inside of fooer.foo()). This might be a bug in calling drop/copy glue, drop/copy glue itself, in the size calculations that take place right before either one of those), or in none of the above. Needs further investigation.

@froystig
Copy link
Contributor Author

Adjust testcase to cover issue #91, which was actually fixed back in commit f02f9cb. Closed by 1a61fb8.

mbrubeck pushed a commit to mbrubeck/rust that referenced this issue Oct 17, 2011
oli-obk pushed a commit to oli-obk/rust that referenced this issue Jul 19, 2017
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
Items chapter cleanup and improvements
eddyb pushed a commit to eddyb/rust that referenced this issue Jun 30, 2020
We now support `--features`, `--all-features` in addition to
`--no-default-features`. This closes rust-lang#91.
antoyo added a commit to antoyo/rust that referenced this issue Sep 28, 2021
* Make define_global() return a RValue directly
* Return LValue in functions declaring a global variable
* Remove useless cast
* Fix bytes_in_context to use an array rvalue
* Remove global_names which is unused
* Make const_struct create a constant struct
* Correctly initialize global in static_addr_of_mut
* Fix global variable initialization
* Remove workaround for ARGV
vadorovsky pushed a commit to vadorovsky/rust that referenced this issue May 15, 2024
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
* Update README.md
* Split off a separate DEVELOPER-GUIDE
jaisnan pushed a commit to jaisnan/rust-dev that referenced this issue Oct 15, 2024
Towards rust-lang#59 

* Added contracts for `unchecked_add` (located in
`library/core/src/num/int_macros.rs` and `uint_macros.rs`)
* Added a harness for `unchecked_add` of each integer type
* `i8`, `i16`, `i32`, `i64`, `i128`, `isize`, `u8`, `u16`, `u32`, `u64`,
`u128`, `usize` --- 12 harnesses in total.

---------

Co-authored-by: yew005 <yew005@ucsd.edu>
Co-authored-by: Rajath Kotyal <53811196+rajathkotyal@users.noreply.github.com>
Co-authored-by: rajathmCMU <rajathkotyal@gmail.com>
jaisnan pushed a commit to jaisnan/rust-dev that referenced this issue Oct 15, 2024
…ed_shl` and `unchecked_shr` (rust-lang#96)

Towards : issue rust-lang#59 

Parent branch :
[c-0011-core-nums-yenyunw-unsafe-ints](https://github.com/rajathkotyal/verify-rust-std/tree/c-0011-core-nums-yenyunw-unsafe-ints
) - Tracking PR rust-lang#91

---------

Co-authored-by: yew005 <yew005@ucsd.edu>
Co-authored-by: MWDZ <jinjunfeng721@gmail.com>
Co-authored-by: Lanfei Ma <99311320+lanfeima@users.noreply.github.com>
Co-authored-by: Yenyun035 <yenyunw@andrew.cmu.edu>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

1 participant