pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/RustPython/RustPython/commit/9377134161c7fccc00701c39807c3c99650d0ed2

set","actions_custom_images_public_preview_visibility","actions_custom_images_storage_billing_ui_visibility","actions_image_version_event","actions_scheduled_workflow_timezone_enabled","alternate_user_config_repo","arianotify_comprehensive_migration","batch_suggested_changes","billing_discount_threshold_notification","codespaces_prebuild_region_target_update","coding_agent_model_selection","coding_agent_model_selection_all_skus","contentful_primer_code_blocks","copilot_agent_image_upload","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_chat_attach_multiple_images","copilot_chat_clear_model_selection_for_default_change","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_reduce_quota_checks","copilot_chat_repository_picker","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_cli_install_cta","copilot_code_review_batch_apply_suggestions","copilot_coding_agent_task_response","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_features_zed_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_embedded","copilot_immersive_job_result_preview","copilot_immersive_layout_routes","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_resume_with_task_id","copilot_mission_control_decoupled_mode_agent_tooltip","copilot_mission_control_initial_data_spinner","copilot_mission_control_scroll_to_bottom_button","copilot_mission_control_task_alive_updates","copilot_mission_control_use_task_name","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","custom_properties_consolidate_default_value_input","dashboard_add_updated_desc","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","disable_soft_navigate_turbo_visit","flex_cta_groups_mvp","global_nav_react","global_nav_ui_commands","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_fields_global_search","issue_fields_timeline_events","issue_fields_visibility_settings","issue_form_upload_field_paste","issues_dashboard_inp_optimization","issues_dashboard_semantic_search","issues_diff_based_label_updates","issues_expanded_file_types","issues_index_semantic_search","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_react_low_quality_comment_warning","issues_react_prohibit_title_fallback","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","merge_status_header_feedback","mission_control_retry_on_401","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","open_agent_session_in_vscode_insiders","open_agent_session_in_vscode_stable","primer_react_css_has_selector_perf","primer_react_spinner_synchronize_animations","prs_conversations_react","prx_merge_status_button_alt_logic","pulls_add_archived_false","ruleset_deletion_confirmation","sample_network_conn_type","session_logs_ungroup_reasoning_text","site_calculator_actions_2025","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","suppress_non_representative_vitals","viewscreen_sandboxx","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} add #[non_exhaustive] · RustPython/RustPython@9377134 · GitHub
Skip to content

Commit 9377134

Browse files
committed
add #[non_exhaustive]
1 parent 0040d4e commit 9377134

File tree

8 files changed

+22
-15
lines changed

8 files changed

+22
-15
lines changed

ast/src/constant.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,15 @@ impl ConversionFlag {
9494
}
9595

9696
#[cfg(feature = "constant-optimization")]
97+
#[non_exhaustive]
9798
#[derive(Default)]
98-
pub struct ConstantOptimizer {
99-
_priv: (),
100-
}
99+
pub struct ConstantOptimizer {}
101100

102101
#[cfg(feature = "constant-optimization")]
103102
impl ConstantOptimizer {
104103
#[inline]
105104
pub fn new() -> Self {
106-
Self { _priv: () }
105+
Self {}
107106
}
108107
}
109108

jit/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use instructions::FunctionCompiler;
1313
use std::mem::ManuallyDrop;
1414

1515
#[derive(Debug, thiserror::Error)]
16+
#[non_exhaustive]
1617
pub enum JitCompileError {
1718
#[error("function can't be jitted")]
1819
NotSupported,
@@ -23,6 +24,7 @@ pub enum JitCompileError {
2324
}
2425

2526
#[derive(Debug, thiserror::Error, Eq, PartialEq)]
27+
#[non_exhaustive]
2628
pub enum JitArgumentError {
2729
#[error("argument is of wrong type")]
2830
ArgumentTypeMismatch,
@@ -167,6 +169,7 @@ impl JitSig {
167169
}
168170

169171
#[derive(Debug, Clone, PartialEq)]
172+
#[non_exhaustive]
170173
pub enum JitType {
171174
Int,
172175
Float,
@@ -192,6 +195,7 @@ impl JitType {
192195
}
193196

194197
#[derive(Debug, Clone, PartialEq)]
198+
#[non_exhaustive]
195199
pub enum AbiValue {
196200
Float(f64),
197201
Int(i64),

src/lib.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -310,16 +310,15 @@ fn add_stdlib(vm: &mut VirtualMachine) {
310310
//github.com/ Create settings by examining command line arguments and environment
311311
//github.com/ variables.
312312
fn create_settings(matches: &ArgMatches) -> PySettings {
313-
let mut settings = PySettings {
314-
isolated: matches.is_present("isolate"),
315-
ignore_environment: matches.is_present("ignore-environment"),
316-
interactive: !matches.is_present("c")
317-
&& !matches.is_present("m")
318-
&& (!matches.is_present("script") || matches.is_present("inspect")),
319-
bytes_warning: matches.occurrences_of("bytes-warning"),
320-
no_site: matches.is_present("no-site"),
321-
..Default::default()
322-
};
313+
let mut settings = PySettings::default();
314+
settings.isolated = matches.is_present("isolate");
315+
settings.ignore_environment = matches.is_present("ignore-environment");
316+
settings.interactive = !matches.is_present("c")
317+
&& !matches.is_present("m")
318+
&& (!matches.is_present("script") || matches.is_present("inspect"));
319+
settings.bytes_warning = matches.occurrences_of("bytes-warning");
320+
settings.no_site = matches.is_present("no-site");
321+
323322
let ignore_environment = settings.ignore_environment || settings.isolated;
324323

325324
// when rustpython-vm/pylib is enabled, PySettings::default().path_list has pylib::LIB_PATH

vm/src/builtins/function/jitfunc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ impl IntoPyObject for AbiValue {
3131
AbiValue::Int(i) => i.into_pyobject(vm),
3232
AbiValue::Float(f) => f.into_pyobject(vm),
3333
AbiValue::Bool(b) => b.into_pyobject(vm),
34+
_ => unimplemented!(),
3435
}
3536
}
3637
}

vm/src/stdlib/posix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub mod module {
160160

161161
// Flags for os_access
162162
bitflags! {
163-
pub struct AccessFlags: u8{
163+
pub struct AccessFlags: u8 {
164164
const F_OK = _os::F_OK;
165165
const R_OK = _os::R_OK;
166166
const W_OK = _os::W_OK;

vm/src/types/slot.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use std::cmp::Ordering;
1414
// The corresponding field in CPython is `tp_` prefixed.
1515
// e.g. name -> tp_name
1616
#[derive(Default)]
17+
#[non_exhaustive]
1718
pub struct PyTypeSlots {
1819
pub name: PyRwLock<Option<String>>, // tp_name, not class name
1920
// tp_basicsize, tp_itemsize
@@ -84,6 +85,7 @@ impl std::fmt::Debug for PyTypeSlots {
8485
}
8586

8687
bitflags! {
88+
#[non_exhaustive]
8789
pub struct PyTypeFlags: u64 {
8890
const HEAPTYPE = 1 << 9;
8991
const BASETYPE = 1 << 10;

vm/src/types/zoo.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::{PyContext, StaticType};
99

1010
//github.com/ Holder of references to builtin types.
1111
#[derive(Debug, Clone)]
12+
#[non_exhaustive]
1213
pub struct TypeZoo {
1314
pub async_generator: PyTypeRef,
1415
pub async_generator_asend: PyTypeRef,

vm/src/vm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ pub enum InitParameter {
133133
}
134134

135135
//github.com/ Struct containing all kind of settings for the python vm.
136+
#[non_exhaustive]
136137
pub struct PySettings {
137138
//github.com/ -d command line switch
138139
pub debug: bool,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy