Skip to content

Commit

Permalink
Minor fixes (#1196)
Browse files Browse the repository at this point in the history
Fixed typos in documents and comments.

Removed redundant `extern crate` items.
  • Loading branch information
wks authored Sep 8, 2024
1 parent 45cdf31 commit a025c24
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 18 deletions.
3 changes: 0 additions & 3 deletions docs/dummyvm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
extern crate libc;
extern crate mmtk;

use std::sync::OnceLock;

use mmtk::vm::VMBinding;
Expand Down
2 changes: 1 addition & 1 deletion docs/userguide/src/migration/prefix.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ See also:

## 0.27.0

### `is_mmtk_object` returns `Option<ObjectReference>
### `is_mmtk_object` returns `Option<ObjectReference>`

```admonish tldr
`memory_manager::is_mmtk_object` now returns `Option<ObjectReference>` instead of `bool`.
Expand Down
5 changes: 0 additions & 5 deletions macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
extern crate proc_macro;
extern crate proc_macro_error;
extern crate quote;
extern crate syn;

use proc_macro::TokenStream;
use proc_macro_error::proc_macro_error;
use syn::parse_macro_input;
Expand Down
5 changes: 0 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,10 @@
//! i.e. [the memory manager API](memory_manager/index.html) that allows a language's memory manager to use MMTk
//! and [the VMBinding trait](vm/trait.VMBinding.html) that allows MMTk to call the language implementation.

extern crate libc;
extern crate strum_macros;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;
extern crate atomic_traits;
extern crate crossbeam;
extern crate num_cpus;
#[macro_use]
extern crate downcast_rs;
#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion src/util/reference_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ impl ReferenceProcessor {

// These funcions call `trace_object()`, which will ensure the object and its descendents will
// be traced. They are only called in steps that expand the transitive closure. That include
// retaining soft references, and (for MarkSweep) tracing objects for forwarding.
// retaining soft references, and (for MarkCompact) tracing objects for forwarding.
// Note that finalizers also expand the transitive closure.
// These functions are intended to make the code easier to understand.

Expand Down
2 changes: 1 addition & 1 deletion src/vm/reference_glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait ReferenceGlue<VM: VMBinding> {
/// Get the referent from a weak reference object.
///
/// Arguments:
/// * `object`: Reference to the referent. `None`` if the object currently does not point to a
/// * `object`: Reference to the referent. `None` if the object currently does not point to a
/// referent. This may happen if the reference has been cleared.
fn get_referent(object: ObjectReference) -> Option<ObjectReference>;

Expand Down
2 changes: 0 additions & 2 deletions tests/test_address.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate mmtk;

use mmtk::util::Address;

#[test]
Expand Down

0 comments on commit a025c24

Please sign in to comment.