mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Auto merge of #18579 - mbrubeck:features, r=KiChjang
Remove unused feature gates CC #5286. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because no code changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18579) <!-- Reviewable:end -->
This commit is contained in:
commit
29517d553e
5 changed files with 13 additions and 9 deletions
|
@ -7,7 +7,6 @@
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(cfg_target_feature)]
|
#![feature(cfg_target_feature)]
|
||||||
#![feature(range_contains)]
|
#![feature(range_contains)]
|
||||||
#![feature(unique)]
|
|
||||||
|
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ impl Shaper {
|
||||||
Shaper::float_to_fixed(pt_size) as c_int);
|
Shaper::float_to_fixed(pt_size) as c_int);
|
||||||
|
|
||||||
// configure static function callbacks.
|
// configure static function callbacks.
|
||||||
hb_font_set_funcs(hb_font, HB_FONT_FUNCS.as_ptr(), font as *mut Font as *mut c_void, None);
|
hb_font_set_funcs(hb_font, HB_FONT_FUNCS.0, font as *mut Font as *mut c_void, None);
|
||||||
|
|
||||||
Shaper {
|
Shaper {
|
||||||
hb_face: hb_face,
|
hb_face: hb_face,
|
||||||
|
@ -411,9 +411,13 @@ impl Shaper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Callbacks from Harfbuzz when font map and glyph advance lookup needed.
|
/// Callbacks from Harfbuzz when font map and glyph advance lookup needed.
|
||||||
|
struct FontFuncs(*mut hb_font_funcs_t);
|
||||||
|
|
||||||
|
unsafe impl Sync for FontFuncs {}
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref HB_FONT_FUNCS: ptr::Unique<hb_font_funcs_t> = unsafe {
|
static ref HB_FONT_FUNCS: FontFuncs = unsafe {
|
||||||
let hb_funcs = hb_font_funcs_create();
|
let hb_funcs = hb_font_funcs_create();
|
||||||
hb_font_funcs_set_glyph_func(hb_funcs, Some(glyph_func), ptr::null_mut(), None);
|
hb_font_funcs_set_glyph_func(hb_funcs, Some(glyph_func), ptr::null_mut(), None);
|
||||||
hb_font_funcs_set_glyph_h_advance_func(
|
hb_font_funcs_set_glyph_h_advance_func(
|
||||||
|
@ -421,7 +425,7 @@ lazy_static! {
|
||||||
hb_font_funcs_set_glyph_h_kerning_func(
|
hb_font_funcs_set_glyph_h_kerning_func(
|
||||||
hb_funcs, Some(glyph_h_kerning_func), ptr::null_mut(), None);
|
hb_funcs, Some(glyph_h_kerning_func), ptr::null_mut(), None);
|
||||||
|
|
||||||
ptr::Unique::new_unchecked(hb_funcs)
|
FontFuncs(hb_funcs)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,7 @@
|
||||||
#![feature(on_unimplemented)]
|
#![feature(on_unimplemented)]
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![feature(proc_macro)]
|
#![feature(proc_macro)]
|
||||||
#![feature(stmt_expr_attributes)]
|
|
||||||
#![feature(try_from)]
|
#![feature(try_from)]
|
||||||
#![feature(unboxed_closures)]
|
|
||||||
#![feature(untagged_unions)]
|
#![feature(untagged_unions)]
|
||||||
|
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
|
|
|
@ -15,7 +15,10 @@
|
||||||
|
|
||||||
|
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
#![feature(box_syntax, plugin, plugin_registrar, rustc_private)]
|
#![feature(box_syntax)]
|
||||||
|
#![feature(plugin)]
|
||||||
|
#![feature(plugin_registrar)]
|
||||||
|
#![feature(rustc_private)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rustc;
|
extern crate rustc;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
//!
|
//!
|
||||||
//! [glutin]: https://github.com/tomaka/glutin
|
//! [glutin]: https://github.com/tomaka/glutin
|
||||||
|
|
||||||
#![feature(start, core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
|
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
extern crate android_injected_glue;
|
extern crate android_injected_glue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue